#include <bits/stdc++.h>
using namespace std;
#include "prize.h"
const int mx=2e6+5;
int tree[mx*4];
int min_segment(int l,int r){
int mid=(l+r)>>1;
vector<int>a = ask(mid);
if(a[0] == 0 && a[1] == 0){
return mid;
}
if(l==r){
return 0;
}
int tmp1=min_segment(l,mid-1);
int tmp2=min_segment(mid+1,r);
return max(tmp1,tmp2);
}
int find_best(int n) {
return min_segment(0,n-1);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
208 KB |
Integer -1 violates the range [0, 199999] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
296 KB |
Integer -1 violates the range [0, 199999] |
2 |
Halted |
0 ms |
0 KB |
- |