#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
); if(mat
==NULL
){ printf("ERROR\n"); return 0; } for(i=0;i<a;i++){
mat
[i
]=(int*)malloc(sizeof(int)*b
); if(mat
[i
]==NULL
) { printf("ERROR\n"); return 0; } }
for(i=0;i<a;i++){
for(j=0;j<b;j++){
mat[i][j]=k++;
}
}
for(i=0;i<a;i++){
for(j=0;j<b;j++){
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KIAovL+W/heimgeOBjOOBguOCjOOBsOWkieaVsOOBquOBqeOCkui/veWKoOOBl+OBpuOCgk9L44Gn44GZCiAKaW50IG1haW4oKXsKICAgIGludCBpLGosaz0xOwogICAgaW50IGEsYjsKICAgIGludCAqKm1hdDsKICAgIHNjYW5mKCIlZCAlZCIsJmEsJmIpOwogICAgbWF0PShpbnQqKiltYWxsb2Moc2l6ZW9mKGludCopKmEpOwogICAgaWYobWF0PT1OVUxMKXsgcHJpbnRmKCJFUlJPUlxuIik7IHJldHVybiAwOyB9CiAgICBmb3IoaT0wO2k8YTtpKyspewogICAgCW1hdFtpXT0oaW50KiltYWxsb2Moc2l6ZW9mKGludCkqYik7CiAgICAJaWYobWF0W2ldPT1OVUxMKSB7IHByaW50ZigiRVJST1JcbiIpOyByZXR1cm4gMDsgfQogICAgfQogICAgZm9yKGk9MDtpPGE7aSsrKXsKICAgIAlmb3Ioaj0wO2o8YjtqKyspewogICAgCQltYXRbaV1bal09aysrOwogICAgCX0KICAgIH0KICAgIGZvcihpPTA7aTxhO2krKyl7CiAgICAgICAgZm9yKGo9MDtqPGI7aisrKXsKICAgICAgICAgICAgcHJpbnRmKCIlZCAiLG1hdFtpXVtqXSk7CiAgICAgICAgfQogICAgICAgIHByaW50ZigiXG4iKTsKICAgIH0KZnJlZShtYXQpOwogICAgcmV0dXJuIDA7Cn0=