#include <stdio.h>
#include <stdio.h>
int main(void) {
// your code goes here
int a,b;
int **matrix
=(int **)malloc(a
* sizeof(int *)); if(matrix==NULL){
return 1;
}
for(int i=0;i<a;i++){
matrix
[i
]=(int*)malloc(b
*sizeof(int)); if(matrix[i]==NULL){
return 1;
}
}
int value=1;
for(int i=0;i<a;i++){
for(int j=0;j<b;j++){
matrix[i][j]=value++;
}
}
for(int i=0;i<a;i++){
for(int j=0;j<b;j++){
}
}
for(int i=0;i<a;i++){
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRpby5oPgoKaW50IG1haW4odm9pZCkgewoJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJaW50IGEsYjsKCXNjYW5mKCIlZCAlZCIsICZhLCAmYik7CgkKCWludCAqKm1hdHJpeD0oaW50ICoqKW1hbGxvYyhhICogc2l6ZW9mKGludCAqKSk7CglpZihtYXRyaXg9PU5VTEwpewoJCQoJCXJldHVybiAxOwoJfQoKCWZvcihpbnQgaT0wO2k8YTtpKyspewoJCW1hdHJpeFtpXT0oaW50KiltYWxsb2MoYipzaXplb2YoaW50KSk7CgkJaWYobWF0cml4W2ldPT1OVUxMKXsKCQkJcmV0dXJuIDE7CgkJfQoJfQoJCglpbnQgdmFsdWU9MTsKCWZvcihpbnQgaT0wO2k8YTtpKyspewoJCWZvcihpbnQgaj0wO2o8YjtqKyspewoJCQltYXRyaXhbaV1bal09dmFsdWUrKzsKCQl9Cgl9CgkKCWZvcihpbnQgaT0wO2k8YTtpKyspewoJCWZvcihpbnQgaj0wO2o8YjtqKyspewoJCQlwcmludGYoIiVkICIsIG1hdHJpeFtpXVtqXSk7CgkJfQoJCXByaW50ZigiXG4iKTsKCX0KCQoJZm9yKGludCBpPTA7aTxhO2krKyl7CgkJZnJlZShtYXRyaXhbaV0pOwoJCQoJfQoJZnJlZShtYXRyaXgpOwoJCglyZXR1cm4gMDsKfQ==