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