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