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