| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 851058 | _Knyaz_ | Guess the number (BOI20_guess) | C++17 | 1 ms | 596 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/// 18.09.2023 16:09 16:30
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n; cin >> n;
int l = 1, r = n;
while(l <= r){
int mid = (l + r) / 2;
cout << "? " << mid << endl;
int q; cin >> q;
if(!q){ cout << "= " << mid; return 0; }
else if(q > 0) r = mid - 1; else l = mid + 1;
}
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
