제출 #703427

#제출 시각아이디문제언어결과실행 시간메모리
703427SamNguyen커다란 상품 (IOI17_prize)C++14
20 / 100
1 ms336 KiB
#include "prize.h" #include <bits/stdc++.h> using namespace std; namespace SUB1 { int find_best(int n) { int l = 0, r = n - 1; while (l <= r) { int m = (l + r) >> 1; auto cnt = ask(m); if (cnt[0] == cnt[1]) return m; if (cnt[0] < cnt[1]) l = m + 1; else r = m - 1; } return -1; } } int find_best(int n) { return SUB1::find_best(n); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...