#include <stdio.h>
#include <stdlib.h>
int main(void)
{
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+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKHZvaWQpCnsKICAgIGludCBpLGosazsKICAgIGludCBhLGI7CiAgICBpbnQgKiptYXQ7CiAgICBzY2FuZigiJWQgJWQiLCZhLCZiKTsKCiAgICBtYXQgPSAoaW50KiopbWFsbG9jKHNpemVvZihpbnQpKmEpOyAgICAKICAgIGZvcihpPTA7aTxhO2krKykKICAgIHsKICAgICAgICBtYXRbaV0gPSAoaW50KiltYWxsb2Moc2l6ZW9mKGludCkqYik7CiAgICB9CgogICAgayA9IDE7IAogICAgZm9yKGk9MDtpPGE7aSsrKQogICAgewogICAgICAgIGZvcihqPTA7ajxiO2orKykKICAgICAgICB7CiAgICAgICAgbWF0W2ldW2pdID0gazsKICAgICAgICBrKys7CiAgICAgICAgfQogICAgfQogICAgCiAgICBmb3IoaT0wO2k8YTtpKyspCiAgICB7CiAgICAgICAgZm9yKGo9MDtqPGI7aisrKQogICAgICAgIHsKICAgICAgICAgICAgcHJpbnRmKCIlZCAiLG1hdFtpXVtqXSk7CiAgICAgICAgfQogICAgICAgIHByaW50ZigiXG4iKTsKICAgIH0KICAgIAogICAgZnJlZShtYXQpOwoKICAgIHJldHVybiAwOwp9Cg==