제출 #96307

#제출 시각아이디문제언어결과실행 시간메모리
96307figter001커다란 상품 (IOI17_prize)C++14
0 / 100
63 ms1288 KiB
#include "prize.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 2e5+50; int l,r,dp[maxn],ans; void qu(int a){ if(dp[a])return; dp[a] = 1; vector<int> res = ask(a); if(res[0] + res[1] == 0){ ans = a; } } int find_best(int n) { srand(time(0)); l=0;r=n-1; ans = -1; while(1){ int a = l + (rand() % (r-l+1)); qu(a); if(ans != -1)return ans; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...