#include <stdio.h>
#include <stdlib.h>
//必要があれば変数などを追加してもOKです
int main()
{
int i, j, k = 1;
int a, b;
int **mat;
//ここで2次元配列の動的確保をする
if((mat
= (int**)malloc(sizeof(int *) *a
)) == NULL
) {
return 0;
}
for(i=0; i<a; i++)
{
if((mat
[i
] = (int *)malloc(sizeof(int) *b
)) == NULL
) {
return 0;
}
}
//ここで2次元配列に数値を代入する
for(i=0; i<a; i++)
{
for(j=0; j<b; j++)
{
mat[i][j] = k;
k++;
}
}
//以下の部分は表示の部分です
//いじらなくてOK
for(i=0;i<a;i++){
for(j=0;j<b;j++){
}
}
//さて,最後に忘れずにすることと言えば?
for(i=0; i<a; i++)
{
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCi8v5b+F6KaB44GM44GC44KM44Gw5aSJ5pWw44Gq44Gp44KS6L+95Yqg44GX44Gm44KCT0vjgafjgZkKCmludCBtYWluKCkKewogICAgaW50IGksIGosIGsgPSAxOwogICAgaW50IGEsIGI7CiAgICBpbnQgKiptYXQ7CiAgICBzY2FuZigiJWQgJWQiLCAmYSwgJmIpOwoKCS8v44GT44GT44GnMuasoeWFg+mFjeWIl+OBruWLleeahOeiuuS/neOCkuOBmeOCiwogICAgaWYoKG1hdCA9IChpbnQqKiltYWxsb2Moc2l6ZW9mKGludCAqKSAqYSkpID09IE5VTEwpCiAgICB7CiAgICAgICAgcHJpbnRmKCJFUlJPUlxuIik7CiAgICAgICAgcmV0dXJuIDA7CiAgICB9CiAgICBmb3IoaT0wOyBpPGE7IGkrKykKICAgIHsKICAgICAgICBpZigobWF0W2ldID0gKGludCAqKW1hbGxvYyhzaXplb2YoaW50KSAqYikpID09IE5VTEwpCiAgICAgICAgewogICAgICAgIHByaW50ZigiRVJST1JcbiIpOwogICAgICAgIHJldHVybiAwOwogICAgICAgIH0KICAgIH0KICAgIAoJLy/jgZPjgZPjgacy5qyh5YWD6YWN5YiX44Gr5pWw5YCk44KS5Luj5YWl44GZ44KLCglmb3IoaT0wOyBpPGE7IGkrKykKCXsKCSAgICBmb3Ioaj0wOyBqPGI7IGorKykKCSAgICB7CgkgICAgICAgIG1hdFtpXVtqXSA9IGs7CgkgICAgICAgIGsrKzsKCSAgICB9CgkgICAgcHJpbnRmKCJcbiIpOwoJfQogICAgCiAgICAvL+S7peS4i+OBrumDqOWIhuOBr+ihqOekuuOBrumDqOWIhuOBp+OBmQogICAgLy/jgYTjgZjjgonjgarjgY/jgaZPSwogICAgZm9yKGk9MDtpPGE7aSsrKXsKICAgICAgICBmb3Ioaj0wO2o8YjtqKyspewogICAgICAgICAgICBwcmludGYoIiVkICIsbWF0W2ldW2pdKTsKICAgICAgICB9CiAgICAgICAgcHJpbnRmKCJcbiIpOwogICAgfQogICAgCiAgICAvL+OBleOBpu+8jOacgOW+jOOBq+W/mOOCjOOBmuOBq+OBmeOCi+OBk+OBqOOBqOiogOOBiOOBsO+8nwogICAgZm9yKGk9MDsgaTxhOyBpKyspCiAgICB7CiAgICAgICAgZnJlZShtYXRbaV0pOwogICAgfQogICAgCiAgICBmcmVlKG1hdCk7CgogICAgcmV0dXJuIDA7Cn0=