답안 #1030323

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1030323 2024-07-22T02:39:39 Z thinknoexit Colors (BOI20_colors) C++17
0 / 100
1 ms 344 KB
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool ask(ll x) {
    cout << "? " << x << endl;
    cin >> x; return x;
}
int main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    ll n;
    cin >> n;
    ask(1);
    ll l = 1, r = n;
    while (l < r) {
        ll mid = (l + r) / 2;
        if (ask(mid + 1)) r = mid;
        else l = mid + 1;
        ask(1);
    }
    cout << "= " << l << endl;
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Hair color 1 was used multiple times
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Hair color 1 was used multiple times
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Hair color 1 was used multiple times
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Hair color 1 was used multiple times
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Hair color 1 was used multiple times
2 Halted 0 ms 0 KB -