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 quanjianan at 2005-07-27 16:03:16 on Problem 2502
#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:
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