# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1048217 | LittleOrange | The Big Prize (IOI17_prize) | C++17 | 1 ms | 348 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.
#include "prize.h"
#include<bits/stdc++.h>
using namespace std;
using ll = int;
int find_best(int n) {
ll l = 0, r = n-1;
while(l<r){
ll m = l+r>>1;
auto o = ask(m);
if (o[0]+o[1]==0){
return m;
}
if (o[0]<m){
r = m-1;
}else{
l = m+1;
}
}
return l;
for(int i = 0; i < n; i++) {
std::vector<int> res = ask(i);
if(res[0] + res[1] == 0)
return i;
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |