Submission #514845

#TimeUsernameProblemLanguageResultExecution timeMemory
514845rajatshenoiColors (BOI20_colors)C++14
0 / 100
0 ms200 KiB
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int N; cin >> N; int j = 0; int k = 1; for (int i = 1; i <= N; i++) { if (i % 2 == 1) { cout << "? " << k << endl; int ans; cin >> ans; if (ans == 0) { cout << "= " << (N - i) << endl; break; } k++; } else { cout << "? " << (N - j) << endl; int ans; cin >> ans; if (ans == 0) { cout << "= " << (N - i) << endl; break; } j++; } } 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...