제출 #227973

#제출 시각아이디문제언어결과실행 시간메모리
227973AaronNaiduThe Big Prize (IOI17_prize)C++14
0 / 100
5 ms512 KiB
#include <bits/stdc++.h> #include "prize.h" using namespace std; int find_best(int n) { int minn = 0; int maxx = n-1; while (minn <= maxx) { int med = (minn + maxx)/2; vector<int> v = ask(med); if (v[0] == 0 and v[1] == 0) { return 0; } if (v[0] == 0 and v[1] == 1) { minn = med + 1; } else { maxx = med - 1; } } return minn; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...