# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
105783 | 2019-04-14T17:16:31 Z | RezwanArefin01 | 커다란 상품 (IOI17_prize) | C++17 | 3 ms | 512 KB |
#include <bits/stdc++.h> #include "prize.h" using namespace std; int find_best(int n) { int lo = 0, hi = n - 1; while(lo <= hi) { int mid = lo + hi >> 1; vector<int> a = ask(mid); if(a[0] + a[1] == 0) return mid; if(a[0]) hi = mid - 1; else lo = mid + 1; } return -1; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 256 KB | Output is correct |
2 | Correct | 3 ms | 384 KB | Output is correct |
3 | Correct | 3 ms | 384 KB | Output is correct |
4 | Correct | 3 ms | 256 KB | Output is correct |
5 | Correct | 2 ms | 376 KB | Output is correct |
6 | Correct | 2 ms | 384 KB | Output is correct |
7 | Correct | 2 ms | 384 KB | Output is correct |
8 | Correct | 3 ms | 396 KB | Output is correct |
9 | Correct | 2 ms | 376 KB | Output is correct |
10 | Correct | 2 ms | 384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 512 KB | Output is correct |
2 | Correct | 2 ms | 384 KB | Output is correct |
3 | Correct | 3 ms | 256 KB | Output is correct |
4 | Correct | 2 ms | 504 KB | Output is correct |
5 | Correct | 2 ms | 428 KB | Output is correct |
6 | Correct | 2 ms | 384 KB | Output is correct |
7 | Correct | 3 ms | 256 KB | Output is correct |
8 | Correct | 2 ms | 384 KB | Output is correct |
9 | Correct | 2 ms | 376 KB | Output is correct |
10 | Correct | 3 ms | 384 KB | Output is correct |
11 | Incorrect | 2 ms | 256 KB | Integer -1 violates the range [0, 199999] |
12 | Halted | 0 ms | 0 KB | - |