# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1253296 | aren_dance | 커다란 상품 (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;
}