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 |
哈哈尽量少和double打交道。还有为啥刷不出0ms,是不是io太多了?又王记\n了搞了一次PE。。。/(ㄒoㄒ)/~~ #include <iostream> #include <stdio.h> using namespace std; int main() { int N; while(1){ scanf("%d", &N); if(N == 0) return N; int arv = 2147483647; for(int i = 0; i < N; i++){ int T, V; scanf("%d%d", &V, &T); if(T < 0) continue; int temp = 16199/V + T + 1; if(temp < arv) arv = temp; } printf("%d", arv); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator