제출 #347423

#제출 시각아이디문제언어결과실행 시간메모리
347423juggernaut커다란 상품 (IOI17_prize)C++14
20 / 100
92 ms492 KiB
#include"prize.h" #include<bits/stdc++.h> #ifdef EVAL #else #include"grader.cpp" #endif using namespace std; int mx; int find_best(int n){ for(int i=0;i<n;i++){ auto res=ask(i); if(!(res[0]|res[1]))return i; mx=max(mx,res[0]+res[1]); if(res[0]+res[1]!=mx)continue; int l=i,r=n-1; while(l<r){ int mid=(l+r)>>1; auto rs=ask(mid); if(rs==res)l=mid+1,i=mid; else r=mid-1; } } }

컴파일 시 표준 에러 (stderr) 메시지

prize.cpp: In function 'int find_best(int)':
prize.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...