Submission #131446

#TimeUsernameProblemLanguageResultExecution timeMemory
13144620160161simoneThe Big Prize (IOI17_prize)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #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:9:3: error: 'vector' was not declared in this scope
   vector<int> q=ask(mid);
   ^~~~~~
prize.cpp:9:3: note: suggested alternative:
In file included from /usr/include/c++/7/vector:64:0,
                 from /usr/include/c++/7/queue:61,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
                 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:9:10: error: expected primary-expression before 'int'
   vector<int> q=ask(mid);
          ^~~
prize.cpp:10:6: error: 'q' was not declared in this scope
   if(q[0]==0&&q[1]==0)
      ^