Submission #537076

# Submission time Handle Problem Language Result Execution time Memory
537076 2022-03-14T11:35:46 Z lalig777 Cluedo (IOI10_cluedo) C++14
Compilation error
0 ms 0 KB
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

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 | }
      | ^