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