# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
834959 |
2023-08-23T03:39:42 Z |
vjudge1 |
Colors (BOI20_colors) |
C++17 |
|
1 ms |
208 KB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll N, X, L, R, mid, tot = 0, tmp = 1, S;
int main () {
cin >> N;
L = 1;
R = N;
tmp = 1;
while(L < R) {
mid = (L+R)/2;
tot += mid*tmp;
tmp *= -1;
X = max(X, 1-tot);
L = mid+1;
}
cout << "? " << X << endl;
cin >> S;
L = 1;
R = N;
tmp = 1;
while(L < R) {
mid = (L+R)/2;
X += mid*tmp;
tmp *= -1;
cout << "? " << X << endl;
cin >> S;
if (S==1) R = mid;
else L = mid+1;
}
cout << "= " << L << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |