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