Submission #940306

#TimeUsernameProblemLanguageResultExecution timeMemory
940306HappyCapybaraCluedo (IOI10_cluedo)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include "cluedo.h" #include<vector> using namespace std; void Solve(){ vector<bool> m(6, true), l(10, true), w(6, true); while (true){ int M=0, L=0, W=0; while (!m[M]) m++; while (!l[L]) l++; while (!w[W]) w++; int x = theory(M+1, L+1, W+1); if (x == 0) return; if (x == 1) m[M] = false; if (x == 2) l[L] = false; if (x == 3) w[W] = false; } }

Compilation message (stderr)

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:10:22: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   10 |       while (!m[M]) m++;
      |                     ~^~
cluedo.cpp:11:22: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   11 |       while (!l[L]) l++;
      |                     ~^~
cluedo.cpp:12:22: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   12 |       while (!w[W]) w++;
      |                     ~^~
cluedo.cpp:13:15: error: 'theory' was not declared in this scope; did you mean 'Theory'?
   13 |       int x = theory(M+1, L+1, W+1);
      |               ^~~~~~
      |               Theory