#include <stdio.h>
#include <stdlib.h>
int m,n=1;//必要があれば変数などを追加してもOKです
int main(){
int i,j,k;
int a,b;
int **mat;
mat
=(int*)malloc(sizeof(int)*a
);//ここで2次元配列の動的確保をする for(m=0; m<a; m++){
mat
[m
]=(int*)malloc(sizeof(int)*b
); }
for(j=0; j<a; j++){
for(k=0; k<b; k++){
mat[j][k]=n;
n++;
}
}//ここで2次元配列に数値を代入する
//以下の部分は表示の部分です
//いじらなくてOK
for(i=0;i<a;i++){
for(j=0;j<b;j++){
}
}
free(mat
);//さて,最後に忘れずにすることと言えば?
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtLG49MTsvL+W/heimgeOBjOOBguOCjOOBsOWkieaVsOOBquOBqeOCkui/veWKoOOBl+OBpuOCgk9L44Gn44GZCgppbnQgbWFpbigpewogICAgaW50IGksaixrOwogICAgaW50IGEsYjsKICAgIGludCAqKm1hdDsKICAgIHNjYW5mKCIlZCAlZCIsJmEsJmIpOwoKCW1hdD0oaW50KiltYWxsb2Moc2l6ZW9mKGludCkqYSk7Ly/jgZPjgZPjgacy5qyh5YWD6YWN5YiX44Gu5YuV55qE56K65L+d44KS44GZ44KLCiAgICBmb3IobT0wOyBtPGE7IG0rKyl7CiAgICAJbWF0W21dPShpbnQqKW1hbGxvYyhzaXplb2YoaW50KSpiKTsKICAgIH0KICAgIAoJZm9yKGo9MDsgajxhOyBqKyspewoJCWZvcihrPTA7IGs8YjsgaysrKXsKCQkJbWF0W2pdW2tdPW47CgkJCW4rKzsKCQl9Cgl9Ly/jgZPjgZPjgacy5qyh5YWD6YWN5YiX44Gr5pWw5YCk44KS5Luj5YWl44GZ44KLCgkKICAgIAogICAgLy/ku6XkuIvjga7pg6jliIbjga/ooajnpLrjga7pg6jliIbjgafjgZkKICAgIC8v44GE44GY44KJ44Gq44GP44GmT0sKICAgIGZvcihpPTA7aTxhO2krKyl7CiAgICAgICAgZm9yKGo9MDtqPGI7aisrKXsKICAgICAgICAgICAgcHJpbnRmKCIlZCAiLG1hdFtpXVtqXSk7CiAgICAgICAgfQogICAgICAgIHByaW50ZigiXG4iKTsKICAgIH0KICAgIAogICAgZnJlZShtYXQpOy8v44GV44Gm77yM5pyA5b6M44Gr5b+Y44KM44Ga44Gr44GZ44KL44GT44Go44Go6KiA44GI44Gw77yfCgoKICAgIHJldHVybiAwOwp9Cg==