Submission #357706

#TimeUsernameProblemLanguageResultExecution timeMemory
357706benedict0724Colors (BOI20_colors)C++17
9 / 100
2 ms384 KiB
#include <iostream> using namespace std; int main() { ios::sync_with_stdio(false);cin.tie(NULL); int n; cin >> n; cout << "? 1" << endl; int ans; cin >> ans; for(int i=2;i<=n;i++){ if(i%2 == 0) cout << "? " << n - i/2 + 1 << endl; else cout << "? " << i/2 + 1 << endl; cin >> ans; if(ans == 0){ cout << "= " << n - i + 2; return 0; } } cout << "= 1"; }
#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...