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