#include<stdio.h>
#include<stdlib.h>
#define RR (16) // 行数
#define CC ( 8) // 列数
int main()
{
int i, j;
#if 1
int (*d
)[RR
][CC
] = malloc(sizeof(*d
)); #elif 0
int (*d
)[RR
][CC
] = (int (*)[RR
][CC
]) malloc(sizeof(*d
)); #elif 0
int (*d)[RR][CC];
#elif 0
int (*d)[RR][CC];
d
= (int (*)[RR
][CC
]) malloc(sizeof(*d
));#endif
for (i = 0; i < RR; i++) {
for (j = 0; j < CC; j++) {
(*d)[i][j] = i * 100 + j;
}
}
for (i = 0; i < RR; i++) {
for (j = 0; j < CC; j++) {
}
}
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8c3RkbGliLmg+CgojZGVmaW5lIFJSICAgICAgKDE2KSAgICAgICAgICAgIC8vIOihjOaVsAojZGVmaW5lIENDICAgICAgKCA4KSAgICAgICAgICAgIC8vIOWIl+aVsAoKaW50IG1haW4oKQp7CiAgICBpbnQgaSwgajsKI2lmICAgMQogICAgaW50ICgqZClbUlJdW0NDXSA9IG1hbGxvYyhzaXplb2YoKmQpKTsKI2VsaWYgMAogICAgaW50ICgqZClbUlJdW0NDXSA9IChpbnQgKCopW1JSXVtDQ10pIG1hbGxvYyhzaXplb2YoKmQpKTsKI2VsaWYgMAogICAgaW50ICgqZClbUlJdW0NDXTsKICAgIGQgPSBtYWxsb2Moc2l6ZW9mKCpkKSk7CiNlbGlmIDAKICAgIGludCAoKmQpW1JSXVtDQ107CiAgICBkID0gKGludCAoKilbUlJdW0NDXSkgbWFsbG9jKHNpemVvZigqZCkpOwojZW5kaWYKICAgIGZvciAoaSA9IDA7IGkgPCBSUjsgaSsrKSB7CiAgICAgICAgZm9yIChqID0gMDsgaiA8IENDOyBqKyspIHsKICAgICAgICAgICAgKCpkKVtpXVtqXSA9IGkgKiAxMDAgKyBqOwogICAgICAgIH0KICAgIH0KICAgIGZvciAoaSA9IDA7IGkgPCBSUjsgaSsrKSB7CiAgICAgICAgZm9yIChqID0gMDsgaiA8IENDOyBqKyspIHsKICAgICAgICAgICAgcHJpbnRmKCIlMDRkICIsICgqZClbaV1bal0pOwogICAgICAgIH0KICAgICAgICBwcmludGYoIlxuIik7CiAgICB9CiAgICBmcmVlKGQpOwoKICAgIHJldHVybiAwOwp9Cg==