#include <stdio.h>
#include <stdlib.h>
int main() {
int a, b;
if (scanf("%d %d", &a
, &b
) != 2 || a
<= 0 || b
<= 0) { return 1;
}
int **matrix
= (int **)malloc(a
* sizeof(int *)); for (int i = 0; i < a; i++) {
matrix
[i
] = (int *)malloc(b
* sizeof(int)); }
int num = 1;
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
matrix[i][j] = num++;
}
}
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
}
}
//A.メモリの解放
for (int i = 0; i < a; i++) {
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKCkgewogICAgaW50IGEsIGI7CgogICAgaWYgKHNjYW5mKCIlZCAlZCIsICZhLCAmYikgIT0gMiB8fCBhIDw9IDAgfHwgYiA8PSAwKSB7CiAgICAgICAgcHJpbnRmKCJpbnZhbGlkXG4iKTsKICAgICAgICByZXR1cm4gMTsKICAgIH0KCiAgICBpbnQgKiptYXRyaXggPSAoaW50ICoqKW1hbGxvYyhhICogc2l6ZW9mKGludCAqKSk7CiAgICBmb3IgKGludCBpID0gMDsgaSA8IGE7IGkrKykgewogICAgICAgIG1hdHJpeFtpXSA9IChpbnQgKiltYWxsb2MoYiAqIHNpemVvZihpbnQpKTsKICAgIH0KCiAgICBpbnQgbnVtID0gMTsKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgYTsgaSsrKSB7CiAgICAgICAgZm9yIChpbnQgaiA9IDA7IGogPCBiOyBqKyspIHsKICAgICAgICAgICAgbWF0cml4W2ldW2pdID0gbnVtKys7CiAgICAgICAgfQogICAgfQoKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgYTsgaSsrKSB7CiAgICAgICAgZm9yIChpbnQgaiA9IDA7IGogPCBiOyBqKyspIHsKICAgICAgICAgICAgcHJpbnRmKCIlZCAiLCBtYXRyaXhbaV1bal0pOwogICAgICAgIH0KICAgICAgICBwcmludGYoIlxuIik7CiAgICB9CgogICAgLy9BLuODoeODouODquOBruino+aUvgogICAgZm9yIChpbnQgaSA9IDA7IGkgPCBhOyBpKyspIHsKICAgICAgICBmcmVlKG1hdHJpeFtpXSk7CiAgICB9CiAgICBmcmVlKG1hdHJpeCk7CgogICAgcmV0dXJuIDA7Cn0=