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