제출 #299555

#제출 시각아이디문제언어결과실행 시간메모리
299555E869120Colors (BOI20_colors)C++14
0 / 100
1 ms256 KiB
#include <iostream> using namespace std; long long N; int main() { // Step #1. Input cin >> N; // Step #2. Get Answer int ret = N; int cl = 1, cr = N; for (int i = 1; i <= N; i++) { if (i % 2 == 1) { cout << "? " << cl << endl; cl += 1; } if (i % 2 == 0) { cout << "? " << cr << endl; cr -= 1; } int x; cin >> x; if (i >= 2 && x == 1) { ret = N - i + 1; } } cout << ret << 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...