#include <stdio.h>
#include <stdlib.h>
int main(){
int i,j,k=1;
int a,b;
int **mat;
mat
= (int**)malloc(sizeof(int)*a
); if(mat
== NULL
){printf("ERROR\n"); return 0;}
for(i=0;i<a;i++){
mat
[i
] = (int*)malloc(sizeof(int)*b
);
if(mat
[i
]==NULL
){printf("ERROR\n");return 0;} }
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++){
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKCl7CglpbnQgaSxqLGs9MTsKICAgIGludCBhLGI7CiAgICBpbnQgKiptYXQ7CiAgICBzY2FuZigiJWQgJWQiLCZhLCZiKTsKCiAgICBtYXQgPSAoaW50KiopbWFsbG9jKHNpemVvZihpbnQpKmEpOwogICAgaWYobWF0ID09IE5VTEwpe3ByaW50ZigiRVJST1JcbiIpOyByZXR1cm4gMDt9CiAgICAKICAgIGZvcihpPTA7aTxhO2krKyl7CiAgICAJbWF0W2ldID0gKGludCopbWFsbG9jKHNpemVvZihpbnQpKmIpOwogICAgCQogICAgCWlmKG1hdFtpXT09TlVMTCl7cHJpbnRmKCJFUlJPUlxuIik7cmV0dXJuIDA7fQogICAgfQogICAgZm9yKGk9MDtpPGE7aSsrKXsKICAgIAlmb3Ioaj0wO2o8YjtqKyspewogICAgCQltYXRbaV1bal09aysrOwogICAgCX0KICAgIH0KICAgIAogICAgZm9yKGk9MDtpPGE7aSsrKXsKICAgICAgICBmb3Ioaj0wO2o8YjtqKyspewogICAgICAgICAgICBwcmludGYoIiVkICIsbWF0W2ldW2pdKTsKICAgICAgICB9CiAgICAgICAgcHJpbnRmKCJcbiIpOwogICAgfQogICAgCiAgICBmcmVlKG1hdCk7CgoKICAgIHJldHVybiAwOwp9Cg==