제출 #738491

#제출 시각아이디문제언어결과실행 시간메모리
738491Elvin_Fritl커다란 상품 (IOI17_prize)C++17
0 / 100
95 ms336 KiB
#include <bits/stdc++.h> using namespace std; #include "prize.h" const int mx=2e6+5; int tree[mx*4],say=0; int min_segment(int l,int r){ if(l>r){ return -1; } int mid=(l+r)>>1; vector<int>a = ask(mid); if(a[0] == 0 && a[1] == 0){ return mid; } if(l==r){ return -1; } int tmp1=min_segment(l,mid-1); if(tmp1!=-1){ return tmp1; } int tmp2=min_segment(mid+1,r); if(tmp2!=-1){ return tmp2; } return -1; } int find_best(int n) { return min_segment(0,n-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...