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