malloc(sizeof(int) * a * b *x)とか?