Submission #1082761

#TimeUsernameProblemLanguageResultExecution timeMemory
1082761toast12Cluedo (IOI10_cluedo)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include "cluedo.h" #include <vector> void Solve(){ vector<int> guess = {1, 1, 1}; int x = Theory(guess[0], guess[1], guess[2]); while (x != 0) { guess[x-1]++; x = Theory(guess[0], guess[1], guess[2]); } return; }

Compilation message (stderr)

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:6:4: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
    6 |    vector<int> guess = {1, 1, 1};
      |    ^~~~~~
      |    std::vector
In file included from /usr/include/c++/10/vector:67,
                 from cluedo.cpp:3:
/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:6:11: error: expected primary-expression before 'int'
    6 |    vector<int> guess = {1, 1, 1};
      |           ^~~
cluedo.cpp:7:19: error: 'guess' was not declared in this scope
    7 |    int x = Theory(guess[0], guess[1], guess[2]);
      |                   ^~~~~