Submission #994919

#TimeUsernameProblemLanguageResultExecution timeMemory
994919ducksaysquackCluedo (IOI10_cluedo)C++98
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "grader.h" #include "cluedo.h" void Solve(){ vector<int> v(3,1); int r = Theory(v[1],v[2],v[3]); while(r) v[r-1]++, v[r-1] %= ((r-1)%2?6:10), r = Theory(v[1],v[2],v[3]); return; }

Compilation message (stderr)

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:5:2: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
    5 |  vector<int> v(3,1); int r = Theory(v[1],v[2],v[3]);
      |  ^~~~~~
      |  std::vector
In file included from /usr/include/c++/10/vector:67,
                 from /usr/include/c++/10/queue:61,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from cluedo.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: 'std::vector' declared here
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
cluedo.cpp:5:9: error: expected primary-expression before 'int'
    5 |  vector<int> v(3,1); int r = Theory(v[1],v[2],v[3]);
      |         ^~~
cluedo.cpp:5:37: error: 'v' was not declared in this scope
    5 |  vector<int> v(3,1); int r = Theory(v[1],v[2],v[3]);
      |                                     ^