这C语言该咋做,不要C++

我的代码

#include <stdio.h>
#include <stdlib.h>
int main() {
    int total_width,total_height,row,col;
    int i,j;
    int cropped_width,cropped_height;
    scanf("%d %d\n",&total_width,&total_height);
    scanf("%d %d %d %d\n",&col,&row,&cropped_width,&cropped_height);

    int **p=(int **) malloc(total_height*sizeof(int*));
    for (i=0;i<total_height;i++)
    {
        p[i]=(int *) malloc(total_width*sizeof(int*));
    }
    for(i=0;i<total_height;i++)
    {
        for(j=0;j<total_width;j++)
            scanf("%d",&p[i][j]);
    }
    for(i=row;i<cropped_height+row;i++)
    {
        for (j = col; j <cropped_width+col; j++)
            printf("%d ", p[i][j]);
        printf("\n");
    }
    return 0;
}


运行结果及报错内容

结果输出正确,但平台判断 答案错误

题目如下

img


输入样例
5 5
1 1 2 3
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
输出样例
7 8
12 13
17 18