# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1048220 | 2024-08-08T05:34:16 Z | LittleOrange | 커다란 상품 (IOI17_prize) | C++17 | 1 ms | 600 KB |
#include "prize.h" #include<bits/stdc++.h> using namespace std; using ll = int; int find_best(int n) { ll l = 0, r = n-1; while(l<r){ ll m = l+r>>1; auto o = ask(m); if (o[0]+o[1]==0){ return m; } if (o[0]){ r = m-1; }else{ l = m+1; } } return l; for(int i = 0; i < n; i++) { std::vector<int> res = ask(i); if(res[0] + res[1] == 0) return i; } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 344 KB | Output is correct |
3 | Correct | 0 ms | 600 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 344 KB | Output is correct |
6 | Correct | 0 ms | 344 KB | Output is correct |
7 | Correct | 1 ms | 344 KB | Output is correct |
8 | Correct | 0 ms | 424 KB | Output is correct |
9 | Correct | 0 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 0 ms | 344 KB | Output is correct |
4 | Correct | 1 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 432 KB | Output is correct |
6 | Correct | 0 ms | 344 KB | Output is correct |
7 | Correct | 0 ms | 424 KB | Output is correct |
8 | Correct | 0 ms | 344 KB | Output is correct |
9 | Correct | 0 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
11 | Incorrect | 1 ms | 344 KB | answer is not correct |
12 | Halted | 0 ms | 0 KB | - |