# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1253296 | aren_dance | The Big Prize (IOI17_prize) | C++20 | 0 ms | 0 KiB |
#include "prize.h"
#include <bits/stdc++.h>
using namespace std;
int find_best(int n) {
for(int i = 0; i < min(n,100); i++) {
std::vector<int> res = ask(i);
if(res[0]==0 && res[1]==0){
return i;
}
}
while(true){
int x=rng()%(n-100)+100;
vector<int> res=ask(x);
if(res[0]==0 && res[1]==0){
return x;
}
}
return 0;
}