# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
256034 | 2020-08-02T08:43:18 Z | 반딧불(#5032) | Colors (BOI20_colors) | C++17 | 1 ms | 256 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; int qc; bool noticed(ll x){ qc++; if(qc > 64){ exit(1); } cout << "? " << x << endl; fflush(stdout); bool ret; scanf("%d", &ret); return ret; } void submit(ll x){ cout << "= " << x << endl; fflush(stdout); exit(0); } ll n; ll ans; int main(){ scanf("%lld", &n); ans = n; printf("= 1\n"); fflush(stdout); return 0; noticed(1); ll l = 2, r = n; ll lft = 0; while(l <= r){ if(!lft){ if(!noticed(r--)) submit(r-l+3); } else{ if(!noticed(l++)) submit(r-l+3); } lft = !lft; } submit(1); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | Wrong guess |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | Wrong guess |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | Wrong guess |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | Wrong guess |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | Wrong guess |
2 | Halted | 0 ms | 0 KB | - |