Submission #1238022

#TimeUsernameProblemLanguageResultExecution timeMemory
1238022ema_nicoleCluedo (IOI10_cluedo)C++17
Compilation error
0 ms0 KiB
#include <iostream>
#include <vector>

using namespace std;

void solve() {
    int om = 1, room = 1, weapon = 1;
    while(1) {
        int nr = theory(om, room, weapon);
        cnt++;
        //cout << om << " " << room << " " << weapon << "  " << nr << '\n';
        if(!nr)
            return;
        if(nr == 1) ///om gresit
            om++;
        else if(nr == 2) ///camera gresita
            room++;
        else if(nr == 3) ///weapon gresit
            weapon++;
    }
}

Compilation message (stderr)

cluedo.cpp: In function 'void solve()':
cluedo.cpp:9:18: error: 'theory' was not declared in this scope
    9 |         int nr = theory(om, room, weapon);
      |                  ^~~~~~
cluedo.cpp:10:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   10 |         cnt++;
      |         ^~~
      |         int