제출 #1043133

#제출 시각아이디문제언어결과실행 시간메모리
1043133OkassaCluedo (IOI10_cluedo)C++14
컴파일 에러
0 ms0 KiB
#include <iostream> #include <vector> #define ll long long using namespace std ; void Solve() { ll M=1,L=1,W=1 ; ll Theory(M,L,W) ; ll x=Theory(M,L,W) ; if (x!=0) { while (x!=0) { if (x==1) { M++ ; }else if (x==2) { L++ ; }else if (x==3) { W++ ; } x=Theory(M,L,W) ; } }else { return ; } }

컴파일 시 표준 에러 (stderr) 메시지

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:8:20: error: expression list treated as compound expression in initializer [-fpermissive]
    8 |     ll Theory(M,L,W) ;
      |                    ^
cluedo.cpp:8:15: warning: left operand of comma operator has no effect [-Wunused-value]
    8 |     ll Theory(M,L,W) ;
      |               ^
cluedo.cpp:8:20: warning: right operand of comma operator has no effect [-Wunused-value]
    8 |     ll Theory(M,L,W) ;
      |                    ^
cluedo.cpp:9:22: error: 'Theory' cannot be used as a function
    9 |     ll x=Theory(M,L,W) ;
      |                      ^
cluedo.cpp:19:23: error: 'Theory' cannot be used as a function
   19 |         x=Theory(M,L,W) ;
      |                       ^