#include <stdio.h>
#include <stdlib.h>
int main() {
int i, j;
int a, b;
int **mat;
int count = 1;
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] = count++;
}
}
for (i = 0; i < a; i++) {
for (j = 0; j < b; j++) {
}
}
for (i = 0; i < a; i++) {
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKCkgewogICAgaW50IGksIGo7CiAgICBpbnQgYSwgYjsKICAgIGludCAqKm1hdDsKICAgIGludCBjb3VudCA9IDE7CgogICAgCiAgICBzY2FuZigiJWQgJWQiLCAmYSwgJmIpOwoKICAgIG1hdCA9IChpbnQgKiopbWFsbG9jKGEgKiBzaXplb2YoaW50ICopKTsKICAgIGZvciAoaSA9IDA7IGkgPCBhOyBpKyspIHsKICAgICAgICBtYXRbaV0gPSAoaW50ICopbWFsbG9jKGIgKiBzaXplb2YoaW50KSk7CiAgICB9CgogICAgZm9yIChpID0gMDsgaSA8IGE7IGkrKykgewogICAgICAgIGZvciAoaiA9IDA7IGogPCBiOyBqKyspIHsKICAgICAgICAgICAgbWF0W2ldW2pdID0gY291bnQrKzsKICAgICAgICB9CiAgICB9CgogICAgZm9yIChpID0gMDsgaSA8IGE7IGkrKykgewogICAgICAgIGZvciAoaiA9IDA7IGogPCBiOyBqKyspIHsKICAgICAgICAgICAgcHJpbnRmKCIlZCAiLCBtYXRbaV1bal0pOwogICAgICAgIH0KICAgICAgICBwcmludGYoIlxuIik7CiAgICB9CgogICAgZm9yIChpID0gMDsgaSA8IGE7IGkrKykgewogICAgICAgIGZyZWUobWF0W2ldKTsKICAgIH0KICAgIGZyZWUobWF0KTsKCiAgICByZXR1cm4gMDsKfQ==