제출 #289134

#제출 시각아이디문제언어결과실행 시간메모리
289134JoMee커다란 상품 (IOI17_prize)C++17
20 / 100
111 ms256 KiB
#include "prize.h" #include <bits/stdc++.h> using namespace std; int res = -1; void q(int l,int r){ if(res != -1)return; int m = (l+r)/2; vector<int> rp = ask(m); if(rp[0] + rp[1] == 0){ res = m; return; } if(l != m){ if(rp[0] > 0) q(l,m); } if(m+1 != r){ if(rp[1] > 0) q(m+1,r); } } int find_best(int n) { q(0,n); return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...