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