#include <stdio.h>
#include <stdlib.h>
int main(){
int i,j,k;
int a,b;
int **mat;
mat
=(int**)malloc(sizeof(int*)*a
); if (mat==NULL) {
return 0;
}
for (i=0;i<a;i++) {
mat
[i
]=(int*)malloc(sizeof(int)*b
); if (mat[i]==NULL) {
return 0;
}
}
k=1;
for(i=0;i<a;i++){
for(j=0;j<b;j++){
mat[i][j]=k;
k++;
}
}
int blank=0;
k--;
for(int i=k;i>0;i/=10){
blank++;
}
for(i=0;i<a;i++){
for(j=0;j<b;j++){
printf("%*d ",blank
,mat
[i
][j
]); }
}
for (i = 0; i < a; i++) {
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KIAppbnQgbWFpbigpewogICAgaW50IGksaixrOwogICAgaW50IGEsYjsKICAgIGludCAqKm1hdDsKICAgIHNjYW5mKCIlZCAlZCIsJmEsJmIpOwogICBtYXQ9KGludCoqKW1hbGxvYyhzaXplb2YoaW50KikqYSk7CiAgICBpZiAobWF0PT1OVUxMKSB7CiAgICAgICAgcHJpbnRmKCJFUlJPUiIpOwogICAgICAgIHJldHVybiAwOwogICAgfQogICAgZm9yIChpPTA7aTxhO2krKykgewogICAgbWF0W2ldPShpbnQqKW1hbGxvYyhzaXplb2YoaW50KSpiKTsKICAgIGlmIChtYXRbaV09PU5VTEwpIHsKICAgICAgICAgICBwcmludGYoIkVSUk9SIik7CiAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgIH0KICAgIH0KICAgIGs9MTsKICAgIGZvcihpPTA7aTxhO2krKyl7CiAgICAgICAgZm9yKGo9MDtqPGI7aisrKXsKICAgICAgICAgICAgbWF0W2ldW2pdPWs7CiAgICAgICAgICAgIGsrKzsKICAgICAgICB9CiAgICB9CiAgICBpbnQgYmxhbms9MDsKICAgIGstLTsKICAgIGZvcihpbnQgaT1rO2k+MDtpLz0xMCl7CiAgICAgICAgYmxhbmsrKzsKICAgIH0KICAgIGZvcihpPTA7aTxhO2krKyl7CiAgICAgICAgZm9yKGo9MDtqPGI7aisrKXsKICAgICAgICAgICAgcHJpbnRmKCIlKmQgIixibGFuayxtYXRbaV1bal0pOwogICAgICAgIH0KICAgICAgICBwcmludGYoIlxuIik7CiAgICB9CiAgICBmb3IgKGkgPSAwOyBpIDwgYTsgaSsrKSB7CiAgICAgICAgZnJlZShtYXRbaV0pOwogICAgfQogICAgZnJlZShtYXQpOwogICAgcmV0dXJuIDA7Cn0=