Submission #1251916

#TimeUsernameProblemLanguageResultExecution timeMemory
1251916aritro_Finding Routers (IOI20_routers)C++20
Compilation error
0 ms0 KiB
std::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}; }

Compilation message (stderr)

routers.cpp:2:6: error: 'vector' in namespace 'std' does not name a template type
    2 | std::vector<int> find_routers(int mx, int n, int q){
      |      ^~~~~~
routers.cpp:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
  +++ |+#include <vector>
    1 |