Submission #805067

#TimeUsernameProblemLanguageResultExecution timeMemory
805067oviyan_gandhiColors (BOI20_colors)C++14
0 / 100
1 ms208 KiB
#include <bits/stdc++.h> typedef long long int ll; using namespace std; int main(){ ll n; cin >> n; cout << "? 1" << endl; bool noticed; cin >> noticed; ll l = 1, r = n; while (l <= r){ ll mid = l + (r-l)/2; cout << "? " << (int)(l + ceil((r-l)/2.0)) << endl; cin >> noticed; if (noticed) r = mid-1; else l = mid+1; } cout << "= " << (r+1) << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...