# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1048217 | 2024-08-08T05:31:41 Z | LittleOrange | The Big Prize (IOI17_prize) | C++17 | 1 ms | 348 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]<m){ 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
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | answer is not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | answer is not correct |
2 | Halted | 0 ms | 0 KB | - |