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 |
尼玛,这么水In Reply To:Re:太水了!!! Posted by:lifanglin at 2012-05-24 09:40:16 对于其他单车选手A,如果他在能超过小明,那么小明就会与A同速。从整体来看,小明是所有选手中最早到达目的地的,因为他总是在其他选手的前面。 int main() { double x,y,ans,tmp; int i,n,len; while(~scanf("%d",&n)&&n) { ans=9999999999; for(i=len=0;i<n;++i){ scanf("%lf%lf",&x,&y); if(y<0)continue; x=x*5.0/18; tmp=4500.0/x+y; if(tmp<ans) ans=tmp; } printf("%.f\n",ceil(ans)); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator