问题
查看原帖
问题
155930
enrichk楼主2020/12/18 22:28
#include<stdio.h>
main(){
int b,c,d,t=0;
scanf("%d",&b);
int a[b][4],e[b][2],f[20][20];
for(int m=0;m<b;m++) 
 for(int i=0;i<4;i++)
  scanf("%d",&a[m][i]); 
scanf("%d%d",&c,&d);
for(int m=0;m<b;m++){
 e[m][0]=a[m][0]+a[m][2];//x坐标相加
 e[m][1]=a[m][1]+a[m][3];//y坐标相加
}
for(int i=0;i<20;i++){
	for(int m=0;m<20;m++)
	f[i][m]=-1;
}
for(int m=0;m<e[t][0];m++){//这里写m<=e[t][0]会错误是为什么?
        t++;
for(int n=0;n<e[t-1][1];n++)
    f[m][n]=t;
}
printf("%d",f[c][d]);
}

大佬们这个有什么问题,

2020/12/18 22:28
加载中...