#include "prize.h"
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <cassert>
using namespace std;
#define rep(i,n)for (int i=0; i<(n); i++)
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define _1 first
#define _2 second
#define INF 1145141919
typedef pair<int, int> P;
int find_best(int N) {
int lo = 0, hi = N-1;
while (hi-lo>=1) {
int mid = (lo+hi)/2;
vector<int> ret = ask(mid);
if (ret[0]+ret[1] == 0) return mid;
if (ret[0]>0) hi = mid-1;
else lo = hi+1;
}
assert(ask(lo)[0]+ask(lo)[1]==0);
return lo;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
3 ms |
504 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
3 ms |
628 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |