Submission #429902

#TimeUsernameProblemLanguageResultExecution timeMemory
429902AmineWeslatiThe Big Prize (IOI17_prize)C++14
20 / 100
2 ms400 KiB
#include "prize.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int>vi; #define pb push_back #define sz(x) (int)x.size() #define all(x) begin(x),end(x) #define FOR(i,a,b) for(int i=a; i<b; i++) int find_best(int N){ int l=0,r=N-1; while(l<=r){ int m=(l+r)/2; vi v=ask(m); if(v[0]+v[1]==0) return m; if(v[0]) r=m-1; else l=m+1; } assert(0); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...