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:帮我看一下吧,实在没办法了:(近乎哀求)wa 掉了,但自以为思路清晰,并且应该AC

Posted by BU at 2005-11-18 21:24:20 on Problem 1922
In Reply To:帮我看一下吧,实在没办法了:(近乎哀求)wa 掉了,但自以为思路清晰,并且应该AC Posted by:iowyh at 2005-07-29 23:13:37
#include<stdio.h>
#include<math.h>
int main()
{
	int n,i,min,t,v;
	double tt,vv,mmin,s;
	while(1)
	{
		scanf("%d",&n);
		if(n==0)
			break;
		min=65536;
		mmin=65536.0;
		for(i=1;i<=n;i++)
		{
			scanf("%d	%d",&v,&t);
			tt=(double)t;
			vv=(double)v;
			if(tt>=0)
			{
				s=tt+(double)4500/(vv/3.6);
				if(s<mmin)
					mmin=s;
			}
		}
		min=(int)ceil(mmin);
		printf("%d\n",min);
	}
	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