제출 #1251913

#제출 시각아이디문제언어결과실행 시간메모리
1251913aritro_Finding Routers (IOI20_routers)C++20
컴파일 에러
0 ms0 KiB
vector<int> find_routers(int mx, int n, int q){ //call with: use_detector(x); //solve for: 2 routers int l=0,r=mx,mid; int ans=0; while(l<=r){ mid=(l+r)/2; int tem=use_detector(mid); if(tem==0) ans=mid,l=mid+1; else r=mid-1; } //cout<<"ANS: "<<(((ans+3)/2)+ans)+1<<endl; return {0,(((ans+1)/2)+ans)+1}; }

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

routers.cpp:2:1: error: 'vector' does not name a type
    2 | vector<int> find_routers(int mx, int n, int q){
      | ^~~~~~