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> main() { long int x,y,i,min,x1,y1,min1,y2,x2; scanf("%d%d",&x1,&y1); scanf("%d%d",&x2,&y2); scanf("%d%d",&x,&y); min1=sqrt((x-x1)*(x-x1)+(y-y1)*(y-y1))/((int) (10*10*10*10/60+0.5)); while (1) { scanf("%d%d",&x1,&y1); if (x1==-1 && y1==-1);break; min=sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y))/((int) (40*10*10*10/60+0.5)); x=x1;y=y1; min1=min+min1; } min=sqrt((x2-x)*(x2-x)+(y2-y)*(y2-y))/((int) (100*10*10*10/60+0.5)); printf("%d",min1+min); getch(); } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator