#include <stdio.h>
#include <stdlib.h>
int main(){
int i, j, k = 1;
int a, b;
int **mat;
mat
= (int **)malloc(a
* sizeof(int *)); for (i = 0; i < a; i++) {
mat
[i
] = (int *)malloc(b
* sizeof(int)); }
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+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKCl7CiAgICBpbnQgaSwgaiwgayA9IDE7ICAKICAgIGludCBhLCBiOwogICAgaW50ICoqbWF0OwoKICAgIHNjYW5mKCIlZCAlZCIsICZhLCAmYik7CgogICAgbWF0ID0gKGludCAqKiltYWxsb2MoYSAqIHNpemVvZihpbnQgKikpOwogICAgZm9yIChpID0gMDsgaSA8IGE7IGkrKykgewogICAgICAgIG1hdFtpXSA9IChpbnQgKiltYWxsb2MoYiAqIHNpemVvZihpbnQpKTsKICAgIH0KCiAgICBmb3IgKGkgPSAwOyBpIDwgYTsgaSsrKSB7CiAgICAgICAgZm9yIChqID0gMDsgaiA8IGI7IGorKykgewogICAgICAgICAgICBtYXRbaV1bal0gPSBrKys7CiAgICAgICAgfQogICAgfQoKICAgIGZvciAoaSA9IDA7IGkgPCBhOyBpKyspIHsKICAgICAgICBmb3IgKGogPSAwOyBqIDwgYjsgaisrKSB7CiAgICAgICAgICAgIHByaW50ZigiJWQgIiwgbWF0W2ldW2pdKTsKICAgICAgICB9CiAgICAgICAgcHJpbnRmKCJcbiIpOwogICAgfQoKICAgIGZvciAoaSA9IDA7IGkgPCBhOyBpKyspIHsKICAgICAgICBmcmVlKG1hdFtpXSk7CiAgICB9CiAgICBmcmVlKG1hdCk7CgogICAgcmV0dXJuIDA7Cn0K