제출 #1104664

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

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

game.c:1:1: warning: data definition has no type or storage class
    1 | d[1500]; initialize(int n) {};hasEdge(int u, int v) {return u>v?++freq[u]==u:++freq[v]==v;}
      | ^
game.c:1:1: warning: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
game.c:1:10: warning: return type defaults to 'int' [-Wimplicit-int]
    1 | d[1500]; initialize(int n) {};hasEdge(int u, int v) {return u>v?++freq[u]==u:++freq[v]==v;}
      |          ^~~~~~~~~~
game.c:1:31: warning: return type defaults to 'int' [-Wimplicit-int]
    1 | d[1500]; initialize(int n) {};hasEdge(int u, int v) {return u>v?++freq[u]==u:++freq[v]==v;}
      |                               ^~~~~~~
game.c: In function 'hasEdge':
game.c:1:67: error: 'freq' undeclared (first use in this function)
    1 | d[1500]; initialize(int n) {};hasEdge(int u, int v) {return u>v?++freq[u]==u:++freq[v]==v;}
      |                                                                   ^~~~
game.c:1:67: note: each undeclared identifier is reported only once for each function it appears in
game.c: In function 'initialize':
game.c:1:29: warning: control reaches end of non-void function [-Wreturn-type]
    1 | d[1500]; initialize(int n) {};hasEdge(int u, int v) {return u>v?++freq[u]==u:++freq[v]==v;}
      |                             ^
game.c: In function 'hasEdge':
game.c:1:91: warning: control reaches end of non-void function [-Wreturn-type]
    1 | d[1500]; initialize(int n) {};hasEdge(int u, int v) {return u>v?++freq[u]==u:++freq[v]==v;}
      |                                                                                           ^