#include <stdio.h>
#include <stdlib.h>
int main() {
int i, j, k = 1;
int a, b;
int **mat;
// 入力を受け取る
// 行列のメモリ確保(a行b列)
mat
= (int **)malloc(a
* sizeof(int *)); for (i = 0; i < a; i++) {
mat
[i
] = (int *)malloc(b
* sizeof(int)); }
// 自然数を行列に代入
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+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKCkgewogICAgaW50IGksIGosIGsgPSAxOwogICAgaW50IGEsIGI7CiAgICBpbnQgKiptYXQ7CgogICAgLy8g5YWl5Yqb44KS5Y+X44GR5Y+W44KLCiAgICBzY2FuZigiJWQgJWQiLCAmYSwgJmIpOwoKICAgIC8vIOihjOWIl+OBruODoeODouODqueiuuS/ne+8iGHooYxi5YiX77yJCiAgICBtYXQgPSAoaW50ICoqKW1hbGxvYyhhICogc2l6ZW9mKGludCAqKSk7CiAgICBmb3IgKGkgPSAwOyBpIDwgYTsgaSsrKSB7CiAgICAgICAgbWF0W2ldID0gKGludCAqKW1hbGxvYyhiICogc2l6ZW9mKGludCkpOwogICAgfQoKICAgIC8vIOiHqueEtuaVsOOCkuihjOWIl+OBq+S7o+WFpQogICAgZm9yIChpID0gMDsgaSA8IGE7IGkrKykgewogICAgICAgIGZvciAoaiA9IDA7IGogPCBiOyBqKyspIHsKICAgICAgICAgICAgbWF0W2ldW2pdID0gaysrOwogICAgICAgIH0KICAgIH0KCiAgICAvLyDooYzliJfjga7lh7rlipsKICAgIGZvciAoaSA9IDA7IGkgPCBhOyBpKyspIHsKICAgICAgICBmb3IgKGogPSAwOyBqIDwgYjsgaisrKSB7CiAgICAgICAgICAgIHByaW50ZigiJWQgIiwgbWF0W2ldW2pdKTsKICAgICAgICB9CiAgICAgICAgcHJpbnRmKCJcbiIpOwogICAgfQoKICAgIC8vIOODoeODouODquOBruino+aUvgogICAgZm9yIChpID0gMDsgaSA8IGE7IGkrKykgewogICAgICAgIGZyZWUobWF0W2ldKTsKICAgIH0KICAgIGZyZWUobWF0KTsKCiAgICByZXR1cm4gMDsKfQo=