#include <stdio.h>
#include <stdlib.h>
//必要があれば変数などを追加してもOKです
int main(){
int i,j,k=1;
int a,b;
int **mat;
mat
=(int **)malloc(sizeof(int*)*a
); for(i
=0;i
<a
;i
++) mat
[i
]=(int*)malloc(sizeof(int)*b
); for(i=0;i<a;i++){
for(j=0;j<b;j++){
mat[i][j]=k;
k++;
}
}
for(i=0;i<a;i++){
for(j=0;j<b;j++){
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KIAovL+W/heimgeOBjOOBguOCjOOBsOWkieaVsOOBquOBqeOCkui/veWKoOOBl+OBpuOCgk9L44Gn44GZCiAKaW50IG1haW4oKXsKICAgIGludCBpLGosaz0xOwogICAgaW50IGEsYjsKICAgIGludCAqKm1hdDsKICAgIHNjYW5mKCIlZCAlZCIsJmEsJmIpOwogCgltYXQ9KGludCAqKiltYWxsb2Moc2l6ZW9mKGludCopKmEpOwoJZm9yKGk9MDtpPGE7aSsrKSBtYXRbaV09KGludCopbWFsbG9jKHNpemVvZihpbnQpKmIpOwoJZm9yKGk9MDtpPGE7aSsrKXsKCQlmb3Ioaj0wO2o8YjtqKyspewoJCQltYXRbaV1bal09azsKCQkJaysrOwoJCX0KCX0KCQogICAgZm9yKGk9MDtpPGE7aSsrKXsKICAgICAgICBmb3Ioaj0wO2o8YjtqKyspewogICAgICAgICAgICBwcmludGYoIiVkICIsbWF0W2ldW2pdKTsKICAgICAgICB9CiAgICAgICAgcHJpbnRmKCJcbiIpOwogICAgfQogCiAgICBmcmVlKCptYXQpOwogICAgZnJlZShtYXQpOwogCiAKICAgIHJldHVybiAwOwp9