poj 1922(注意当time<0的时候,不是速度太快先到终点,就是速度太慢赶不上当前的自行车)

#include<iostream>
#include<cstdio>
using namespace std;
int main(){
    int n,x,y;
    while(scanf("%d",&n)&&n){
        int a = ~(unsigned)0>>1;
        while(n--){
            scanf("%d%d",&x,&y);
            int b = 16200.0/x+y+0.999999;
            if(y>=0&&b<a)a = b;
        }
        printf("%d\n",a);
    }
    return 0;
} 

 

posted @ 2021-07-30 16:43  智人心  阅读(28)  评论(0)    收藏  举报