제출 #123043

#제출 시각아이디문제언어결과실행 시간메모리
123043win11905게임 (IOI14_game)C++11
컴파일 에러
0 ms0 KiB
int c[2e3];void initialize(int){}int hasEdge(int u,int v){return++c[u=u>v?u:v]==u;}

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

game.cpp:1:10: error: size of array 'c' has non-integral type 'double'
 int c[2e3];void initialize(int){}int hasEdge(int u,int v){return++c[u=u>v?u:v]==u;}
          ^
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:1:70: warning: operation on 'u' may be undefined [-Wsequence-point]
 int c[2e3];void initialize(int){}int hasEdge(int u,int v){return++c[u=u>v?u:v]==u;}
                                                                     ~^~~~~~~~