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

哈哈尽量少和double打交道。还有为啥刷不出0ms,是不是io太多了?

Posted by KatrineYang at 2016-07-29 23:13:38 on Problem 1922 and last updated at 2016-07-29 23:18:10
又王记\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:
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