Submission #131444

#TimeUsernameProblemLanguageResultExecution timeMemory
13144420160161simoneThe Big Prize (IOI17_prize)C++14
Compilation error
0 ms0 KiB
#include "prize.h" int find_best(int n) { int l=0,r=n-1; while(0==0) { int mid=(l+r)/2; vector<int> q=ask(mid); if(q[0]==0&&q[1]==0) { return mid+1; } else { if(q[0]==1) { r=mid; } else l=mid; } } }

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:8:3: error: 'vector' was not declared in this scope
   vector<int> q=ask(mid);
   ^~~~~~
prize.cpp:8:3: note: suggested alternative:
In file included from /usr/include/c++/7/vector:64:0,
                 from prize.h:1,
                 from prize.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:216:11: note:   'std::vector'
     class vector : protected _Vector_base<_Tp, _Alloc>
           ^~~~~~
prize.cpp:8:10: error: expected primary-expression before 'int'
   vector<int> q=ask(mid);
          ^~~
prize.cpp:9:6: error: 'q' was not declared in this scope
   if(q[0]==0&&q[1]==0)
      ^