Submission #717633

#TimeUsernameProblemLanguageResultExecution timeMemory
717633VMaksimoski008Cluedo (IOI10_cluedo)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include "cluedo.h" #include <set> void Solve(){ int r; set<int> mur, place, weapon; for(int i=1; i<=6; i++) { for(int j=1; j<=10; j++) { for(int k=1; k<=6; k++) { if(mur.count(i) == 0 && place.count(j) == 0 && weapon.count(k)) { r = Theory(i, j, k); if(r == 1) mur.insert(i); else if(r == 2) place.insert(j); else if(r == 3) wepaon.insert(k); else if(r == 0) return ; } } } } }

Compilation message (stderr)

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:8:4: error: 'set' was not declared in this scope; did you mean 'std::set'?
    8 |    set<int> mur, place, weapon;
      |    ^~~
      |    std::set
In file included from /usr/include/c++/10/set:61,
                 from cluedo.cpp:3:
/usr/include/c++/10/bits/stl_set.h:94:11: note: 'std::set' declared here
   94 |     class set
      |           ^~~
cluedo.cpp:8:8: error: expected primary-expression before 'int'
    8 |    set<int> mur, place, weapon;
      |        ^~~
cluedo.cpp:16:19: error: 'mur' was not declared in this scope
   16 |                if(mur.count(i) == 0 && place.count(j) == 0 && weapon.count(k))
      |                   ^~~
cluedo.cpp:16:40: error: 'place' was not declared in this scope
   16 |                if(mur.count(i) == 0 && place.count(j) == 0 && weapon.count(k))
      |                                        ^~~~~
cluedo.cpp:16:63: error: 'weapon' was not declared in this scope
   16 |                if(mur.count(i) == 0 && place.count(j) == 0 && weapon.count(k))
      |                                                               ^~~~~~
cluedo.cpp:21:36: error: 'wepaon' was not declared in this scope
   21 |                    else if(r == 3) wepaon.insert(k);
      |                                    ^~~~~~