# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
804694 | 2023-08-03T10:53:44 Z | Ellinor | 커다란 상품 (IOI17_prize) | C++14 | 1 ms | 344 KB |
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for (int i = (a); i < (b); i++) #define pb push_back typedef long long ll; typedef pair<int, int> pii; #include "prize.h" int find_best(int n) { int ans; int low = 0, high = n - 1; int mid; while (low <= high) { mid = (low + high) / 2; std::vector<int> res = ask(mid); if(res[0] + res[1] == 0) ans = mid; if (res[0] > res[1]) high = mid - 1; else low = mid + 1; } return ans; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 332 KB | Output is correct |
2 | Correct | 1 ms | 296 KB | Output is correct |
3 | Correct | 1 ms | 288 KB | Output is correct |
4 | Correct | 1 ms | 292 KB | Output is correct |
5 | Correct | 1 ms | 312 KB | Output is correct |
6 | Correct | 1 ms | 288 KB | Output is correct |
7 | Correct | 1 ms | 312 KB | Output is correct |
8 | Correct | 1 ms | 276 KB | Output is correct |
9 | Correct | 0 ms | 288 KB | Output is correct |
10 | Correct | 1 ms | 256 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 292 KB | Output is correct |
2 | Correct | 1 ms | 292 KB | Output is correct |
3 | Correct | 1 ms | 316 KB | Output is correct |
4 | Correct | 1 ms | 296 KB | Output is correct |
5 | Correct | 1 ms | 312 KB | Output is correct |
6 | Correct | 0 ms | 292 KB | Output is correct |
7 | Correct | 1 ms | 296 KB | Output is correct |
8 | Correct | 1 ms | 208 KB | Output is correct |
9 | Correct | 1 ms | 344 KB | Output is correct |
10 | Correct | 1 ms | 208 KB | Output is correct |
11 | Incorrect | 1 ms | 208 KB | answer is not correct |
12 | Halted | 0 ms | 0 KB | - |