#include <stdio.h>
#include <stdlib.h>
int main(void) {
int a, b;
int **arr
= (int **)malloc(sizeof(int *) * a
); for (int i = 0; i < a; i++) {
arr
[i
] = (int *)malloc(sizeof(int) * b
); }
int cur = 1;
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
arr[i][j] = cur;
cur++;
}
}
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
}
}
for (int i = 0; i < a; i++) {
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKHZvaWQpIHsKICAgIGludCBhLCBiOwogICAgc2NhbmYoIiVkICVkIiwgJmEsICZiKTsKICAgIGludCAqKmFyciA9IChpbnQgKiopbWFsbG9jKHNpemVvZihpbnQgKikgKiBhKTsKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgYTsgaSsrKSB7CiAgICAgICAgYXJyW2ldID0gKGludCAqKW1hbGxvYyhzaXplb2YoaW50KSAqIGIpOwogICAgfQoKICAgIGludCBjdXIgPSAxOwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCBhOyBpKyspIHsKICAgICAgICBmb3IgKGludCBqID0gMDsgaiA8IGI7IGorKykgewogICAgICAgICAgICBhcnJbaV1bal0gPSBjdXI7CiAgICAgICAgICAgIGN1cisrOwogICAgICAgIH0KICAgIH0KCiAgICBmb3IgKGludCBpID0gMDsgaSA8IGE7IGkrKykgewogICAgICAgIGZvciAoaW50IGogPSAwOyBqIDwgYjsgaisrKSB7CiAgICAgICAgICAgIHByaW50ZigiJWQiLCBhcnJbaV1bal0pOwogICAgICAgICAgICBpZiAoaiA8IGIgLSAxKSBwcmludGYoIiAiKTsKICAgICAgICB9CiAgICAgICAgcHJpbnRmKCJcbiIpOwogICAgfQogICAgZm9yIChpbnQgaSA9IDA7IGkgPCBhOyBpKyspIHsKICAgICAgICBmcmVlKGFycltpXSk7CiAgICB9CiAgICBmcmVlKGFycik7CgogICAgcmV0dXJuIDA7Cn0K