제출 #647456

#제출 시각아이디문제언어결과실행 시간메모리
647456a_aguilo커다란 상품 (IOI17_prize)C++14
20 / 100
1 ms296 KiB
#include<bits/stdc++.h> #include "prize.h" using namespace std; int find_best(int n) { int lo = 0; int hi = n-1; while(hi >= lo){ int mid = lo + (hi - lo)/2; vector<int> ans = ask(mid); if (ans[0] == 0 and ans[1] == 0) return mid; if(ans[0] == 0){ lo = mid+1; } else hi = mid-1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...