제출 #537076

#제출 시각아이디문제언어결과실행 시간메모리
537076lalig777Cluedo (IOI10_cluedo)C++14
컴파일 에러
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; }

컴파일 시 표준 에러 (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 | }
      | ^