#include <stdio.h>
#include <stdlib.h>
int main(void) {
int i,s,t,p,q;
int b=1;
int **a;
a
=(int**)malloc(sizeof(int*)*s
);
for(i=0;i<s;i++){
a
[i
]=(int*)malloc(sizeof(int)*t
); }
for(p=0;p<s;p++){
for(q=0;q<t;q++){
a[p][q]=b;
b++;
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKHZvaWQpIHsKCQoJaW50IGkscyx0LHAscTsKCWludCBiPTE7CglpbnQgKiphOwoJc2NhbmYoIiVkIiwmcyk7CglzY2FuZigiJWQiLCZ0KTsKCQoJYT0oaW50KiopbWFsbG9jKHNpemVvZihpbnQqKSpzKTsKCQoJZm9yKGk9MDtpPHM7aSsrKXsKCQlhW2ldPShpbnQqKW1hbGxvYyhzaXplb2YoaW50KSp0KTsKCX0KCQoJZm9yKHA9MDtwPHM7cCsrKXsKCQlmb3IocT0wO3E8dDtxKyspewoJCQlhW3BdW3FdPWI7CgkJCXByaW50ZigiJWQgIixhW3BdW3FdKTsKCQkJYisrOwoJCX0KCQlwcmludGYoIlxuIik7Cgl9CgkJCgkKCgkKCQoJCglyZXR1cm4gMDsKfQo=