#include <stdio.h>
#include <stdlib.h>
int main(){
int i,j,k;
int a,b;
int **mat;
mat
= (int*)malloc(sizeof(int) * a
); for(i=0; i<a; i++)
{
mat
[i
] = (int*)malloc(sizeof(int) * b
); }
k = 1;
for(i=0; i<a; i++)
{
for(j=0; j<b; j++)
{
mat[i][j] = k;
k++;
}
}
for(i=0;i<a; i++)
{
for(j=0;j<b;j++)
{
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKCl7CiAgICBpbnQgaSxqLGs7CiAgICBpbnQgYSxiOwogICAgaW50ICoqbWF0OwogICAgc2NhbmYoIiVkICVkIiwmYSwmYik7CgogICAgbWF0ID0gKGludCopbWFsbG9jKHNpemVvZihpbnQpICogYSk7CiAgICBmb3IoaT0wOyBpPGE7IGkrKykKICAgIHsKICAgIAltYXRbaV0gPSAoaW50KiltYWxsb2Moc2l6ZW9mKGludCkgKiBiKTsKICAgIH0KCQoJayA9IDE7CgkKCWZvcihpPTA7IGk8YTsgaSsrKQoJewogICAgICAgIGZvcihqPTA7IGo8YjsgaisrKQogICAgICAgIHsKICAgICAgICAJbWF0W2ldW2pdID0gazsKICAgICAgICAJaysrOwogICAgICAgIH0KCX0KCQogICAgZm9yKGk9MDtpPGE7IGkrKykKCXsKICAgICAgICBmb3Ioaj0wO2o8YjtqKyspCiAgICAgICAgewogICAgICAgIAlwcmludGYoIiVkICIsIG1hdFtpXVtqXSk7CiAgICAgICAgfQogICAgICAgIHByaW50ZigiXG4iKTsKCX0KICAgIAoJZnJlZShtYXQpOwoKICAgIHJldHVybiAwOwp9Cg==