Submission #125916

# Submission time Handle Problem Language Result Execution time Memory
125916 2019-07-06T14:12:43 Z chubyxdxd The Big Prize (IOI17_prize) C++11
20 / 100
2 ms 508 KB
#include "prize.h"
#include <bits/stdc++.h>

using namespace std;
int find_best(int n) {
	vector<int> v;
	int low=0;int hi=n,mid;
	while(hi-low>1){
		v.clear();
		mid=(low+hi)/2;
		v=ask(mid);
		if(v[0]==0 and v[1]==0){
			return mid;
			break;
		}
		if(v[0]<v[1]){
			low=mid;
		}
		else{
			hi=mid;
		}
	}
	return ((low+hi)/2);
}	
# Verdict Execution time Memory Grader output
1 Correct 2 ms 504 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 308 KB Output is correct
4 Correct 2 ms 424 KB Output is correct
5 Correct 2 ms 304 KB Output is correct
6 Correct 2 ms 252 KB Output is correct
7 Correct 2 ms 404 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 2 ms 388 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2 ms 388 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 508 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 308 KB Output is correct
7 Correct 2 ms 248 KB Output is correct
8 Correct 2 ms 248 KB Output is correct
9 Correct 2 ms 252 KB Output is correct
10 Correct 2 ms 376 KB Output is correct
11 Incorrect 2 ms 304 KB answer is not correct
12 Halted 0 ms 0 KB -