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 jackch at 2006-09-29 10:12:21 on Problem 1922
In Reply To:俺哭了 Posted by:sunnvya at 2006-09-29 10:09:38
#include<iostream>
#include<math.h>
#include<set>
using namespace std;
set<long>a;
int main()     
{ 
    int n;
    long vi,ti,t0, t_min=999999999;
    while(cin>>n&&n!=0)
    {                 
                       for(int i=0;i<n;++i)
                       {
                           cin>>vi>>ti;
                           if(ti<0)continue;
                           t0=ceil(((4.5/vi)*3600)+ti);
                           a.insert(t0);
                           
                       }
                       cout<<*a.begin()<<endl;
                       a.clear();
    }
    
    getchar();
    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