Submission #537076

#TimeUsernameProblemLanguageResultExecution timeMemory
537076lalig777Cluedo (IOI10_cluedo)C++14
Compilation error
0 ms0 KiB
int Solve (int a, int b, int c){ if (Theory(a,b,c)==1) return Solve (a+1, b, c); else if (Theory(a,b,c)==2) return Solve (a, b+1, c); else if (Theory(a,b,c)==3) return Solve (a, b, c+1); else return a, b, c; }

Compilation message (stderr)

cluedo.cpp: In function 'int Solve(int, int, int)':
cluedo.cpp:2:7: error: 'Theory' was not declared in this scope
    2 |   if (Theory(a,b,c)==1) return Solve (a+1, b, c);
      |       ^~~~~~
cluedo.cpp:5:15: warning: left operand of comma operator has no effect [-Wunused-value]
    5 |   else return a, b, c;
      |               ^
cluedo.cpp:5:21: warning: right operand of comma operator has no effect [-Wunused-value]
    5 |   else return a, b, c;
      |                     ^
cluedo.cpp:6:1: warning: control reaches end of non-void function [-Wreturn-type]
    6 | }
      | ^