Submission #717630

# Submission time Handle Problem Language Result Execution time Memory
717630 2023-04-02T09:59:35 Z VMaksimoski008 Cluedo (IOI10_cluedo) C++14
Compilation error
0 ms 0 KB
#include "grader.h"
#include "cluedo.h"

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

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:7:4: error: 'set' was not declared in this scope
    7 |    set<int> mur, place, weapon;
      |    ^~~
cluedo.cpp:7:8: error: expected primary-expression before 'int'
    7 |    set<int> mur, place, weapon;
      |        ^~~
cluedo.cpp:15:19: error: 'mur' was not declared in this scope
   15 |                if(mur.count(i) == 0 && place.count(j) == 0 && weapon.count(k))
      |                   ^~~
cluedo.cpp:15:40: error: 'place' was not declared in this scope
   15 |                if(mur.count(i) == 0 && place.count(j) == 0 && weapon.count(k))
      |                                        ^~~~~
cluedo.cpp:15:63: error: 'weapon' was not declared in this scope
   15 |                if(mur.count(i) == 0 && place.count(j) == 0 && weapon.count(k))
      |                                                               ^~~~~~
cluedo.cpp:20:36: error: 'wepaon' was not declared in this scope
   20 |                    else if(r == 3) wepaon.insert(k);
      |                                    ^~~~~~