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

Re:...想明白了你会发现很简单。。。看讨论的人比较多,,我也来说说,,呵呵

Posted by 810974380 at 2009-08-28 17:25:27 on Problem 1922 and last updated at 2009-08-28 17:30:54
In Reply To:...想明白了你会发现很简单。。。看讨论的人比较多,,我也来说说,,呵呵 Posted by:TangMing at 2009-08-12 19:54:58
确实水~
就是求最早到的时间~

顶!

Problem: 1922  User: 810974380 
Memory: 368K  Time: 0MS 
Language: C  Result: Accepted 

Source Code 
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int a[10001],b[10001];double c[10001];
int n,i;double x,res;
int main()
{
	while(scanf("%d",&n))
	{
	  if(n==0) break;
	  for(i=0;i<n;i++)
	  {
		scanf("%d%d",&a[i],&b[i]);
		if(b[i]>=0) c[i]=b[i]+(4.5*3600*1.0/a[i]);
		else c[i]=10000000;
	  }
	  x=10000000.0;
	  for(i=0;i<n;i++)
	  if(x>c[i]) x=c[i];
	  res=ceil(x*1.0);
	  printf("%d\n",(int)res);
   }
   system("pause");
   return 0;
}
  
	  
	


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