Submission #738483

#TimeUsernameProblemLanguageResultExecution timeMemory
738483Elvin_FritlThe Big Prize (IOI17_prize)C++17
0 / 100
105 ms304 KiB
#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,max(l,mid-1)); int tmp2=min_segment(min(r,mid+1),r); return max(tmp1,tmp2); } int find_best(int n) { return min_segment(0,n-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...