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

求教一下,为什么老是wa,快哭了.本来很有信心ac的

Posted by Move at 2006-08-23 15:06:55 on Problem 1922
#include <stdio.h>

int main()
{
	long i,n;
	double s,v,t,t0,time;
	scanf("%ld",&n);
	while(n){
		time=900000000;
		s=4500;
		for(i=0;i<n;i++){
			scanf("%lf%lf",&v,&t);
			if(t>=0){
				t0=s/(v/3.6)+t;
				if(t0<time)
					time=t0;
			}
		}
		if(time-(long)time>0)
			time+=1;
		printf("%ld\n",(long)time);
		scanf("%ld",&n);
	}
	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