Submission #1099337

#TimeUsernameProblemLanguageResultExecution timeMemory
1099337ZflopCluedo (IOI10_cluedo)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include "cluedo.h" #include <bits/stdc++.h> void Solve(){ vector<bool>K(11,1),J(10,1); for (int i = 1; i <= 6;++i) { bool ok1 = true; for (int j = 1; j <= 6;++j) { bool ok3 = J[j]; for (int k = 1; k <= 10 && ok1 && ok3;++k) { if(K[k] == false) continue; int r = Theory(i,k,j); if(r == 1) ok1 = false; if(r == 3) ok3 = J[j] = false; if(r == 2) { K[k] = false; continue; } if(r == 0) return; } } } }

Compilation message (stderr)

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:6:5: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
    6 |     vector<bool>K(11,1),J(10,1);
      |     ^~~~~~
      |     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: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:12: error: expected primary-expression before 'bool'
    6 |     vector<bool>K(11,1),J(10,1);
      |            ^~~~
cluedo.cpp:10:24: error: 'J' was not declared in this scope
   10 |             bool ok3 = J[j];
      |                        ^
cluedo.cpp:12:20: error: 'K' was not declared in this scope
   12 |                 if(K[k] == false) continue;
      |                    ^
cluedo.cpp:17:21: error: 'K' was not declared in this scope
   17 |                     K[k] = false;
      |                     ^