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