제출 #41842

#제출 시각아이디문제언어결과실행 시간메모리
41842rahasiaThe Big Prize (IOI17_prize)C++14
컴파일 에러
0 ms0 KiB
//#include "prize.h" #include<bits/stdc++.h> using namespace std; int l,r,c,ma; int find_best(int n) { for(int i = 0; i < n; i++) { std::vector<int> res = ask(i); if(res[0] + res[1] == 0) return i; ma=max(ma,res[0]+res[1]); if(res[0]+res[1]<ma) continue; l=i; r=n-1; while(l<=r) { c=(l+r)/2; vector<int> hv=ask(c); if(hv==res) { i=c; l=c+1; } else r=c-1; } } return 0; }

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

prize.cpp: In function 'int find_best(int)':
prize.cpp:7:31: error: 'ask' was not declared in this scope
   std::vector<int> res = ask(i);
                               ^