# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1184050 | alterio | 커다란 상품 (IOI17_prize) | C++20 | 1 ms | 408 KiB |
#include "prize.h"
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
int find_best(int n) {
int l = 0, r = n;
while (l + 1 < r) {
int mid = (l + r) / 2;
vector<int> get = ask(mid);
if (get[0] + get[1] == 0) return mid;
if (get[0] == 1) r = mid;
else l = mid;
}
return l;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |