제출 #231721

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

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

game.c:1:1: warning: data definition has no type or storage class
 d[2e3];initialize(n){}hasEdge(u,v){return++d[u=u>v?u:v]==u;}
 ^
game.c:1:1: warning: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
game.c:1:1: error: size of array 'd' has non-integer type
game.c:1:1: warning: variably modified 'd' at file scope
game.c:1:8: warning: return type defaults to 'int' [-Wimplicit-int]
 d[2e3];initialize(n){}hasEdge(u,v){return++d[u=u>v?u:v]==u;}
        ^~~~~~~~~~
game.c: In function 'initialize':
game.c:1:8: warning: type of 'n' defaults to 'int' [-Wimplicit-int]
game.c: At top level:
game.c:1:23: warning: return type defaults to 'int' [-Wimplicit-int]
 d[2e3];initialize(n){}hasEdge(u,v){return++d[u=u>v?u:v]==u;}
                       ^~~~~~~
game.c: In function 'hasEdge':
game.c:1:23: warning: type of 'u' defaults to 'int' [-Wimplicit-int]
game.c:1:23: warning: type of 'v' defaults to 'int' [-Wimplicit-int]
game.c:1:47: warning: operation on 'u' may be undefined [-Wsequence-point]
 d[2e3];initialize(n){}hasEdge(u,v){return++d[u=u>v?u:v]==u;}
                                              ~^~~~~~~~
game.c: In function 'initialize':
game.c:1:1: warning: control reaches end of non-void function [-Wreturn-type]
 d[2e3];initialize(n){}hasEdge(u,v){return++d[u=u>v?u:v]==u;}
 ^