Submission #296902

# Submission time Handle Problem Language Result Execution time Memory
296902 2020-09-11T04:29:34 Z Dovran The Big Prize (IOI17_prize) C++11
20 / 100
1 ms 384 KB
#include <bits/stdc++.h>
#include "prize.h"

#define N 300009
#define pii pair <int, int>
#define ff first
#define ss second
#define pb push_back
#define ll long long

using namespace std;
/*
vector<int> ask(int x){
	int a, b;
	cin>>a>>b;
	vector<int>e;
	e.pb(a), e.pb(b);
	return e;
}
*/
int find_best(int n){
	int l=0, r=n-1;
	int ans=0;
	while(l<=r){
		int md=(l+r)/2;
		vector<int>e=ask(md);
		if(e[0]+e[1]>1){
			ans=3;
			break;
		}
		if(e[0]==0 and e[1]==0){
			ans=md;
			break;
		}
		if(e[0]>0)
			r=md-1;
		else
			l=md+1;
	}
	return ans;
}
/*
int main(){
	int n;
	cin>>n;
	cout<<find_best(n);
}*/
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 1 ms 256 KB Output is correct
5 Correct 1 ms 256 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 1 ms 256 KB Output is correct
8 Correct 1 ms 384 KB Output is correct
9 Correct 0 ms 384 KB Output is correct
10 Correct 1 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 1 ms 256 KB Output is correct
5 Correct 1 ms 256 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 1 ms 256 KB Output is correct
8 Correct 1 ms 256 KB Output is correct
9 Correct 0 ms 256 KB Output is correct
10 Correct 1 ms 256 KB Output is correct
11 Incorrect 1 ms 256 KB answer is not correct
12 Halted 0 ms 0 KB -