Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

哪位有空能帮一下忙吗 调试到一半时说什么数据包有错误 不明白什么意思啊

Posted by 6382468 at 2004-12-05 15:40:59 on Problem 1046
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator