제출 #722422

#제출 시각아이디문제언어결과실행 시간메모리
722422tvladm2009커다란 상품 (IOI17_prize)C++17
0 / 100
1 ms336 KiB
#include <bits/stdc++.h> #include "prize.h" using namespace std; typedef long long ll; int find_best(int N) { int l = 1, r = N; while (l < r) { int mid = (l + r) / 2; vector <int> cnt = ask(mid); if (cnt[0] == 0 && cnt[1] == 0) { return mid; } else if (cnt[0] < cnt[1]) { l = mid + 1; } else { r = mid; } } return l; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...