#include "prize.h"
#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
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;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |