Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
哪位有空能帮一下忙吗 调试到一半时说什么数据包有错误 不明白什么意思啊#include<stdio.h> #include<math.h> void main(){ int a[16][3]; int i,j; int m,n,p,min,x,y,z; long int s[16][1]; for(j=0;j<=15;j++){ scanf("%d%d%d",&x,&y,&z); a[j][1]=x; a[j][2]=y; a[j][3]=z; } scanf("%d%d%d",&m,&n,&p); while((m!=-1)&&(n!=-1)&&(p!=-1)){ for(i=0;i<=15;i++){ s[i][1]=pow((a[i][1]-m),2)+pow((a[i][2]-n),2)+pow((a[i][3]-p),2); scanf("%ld",s[i][1]); min=s[0][1]; if(s[i][1]<min) min=(int)s[i]; } printf("(%d,%d,%d)maps to(%d,%d,%d)\n",m,n,p,a[i][1],a[i][2],a[i][3]); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator