제출 #741504

#제출 시각아이디문제언어결과실행 시간메모리
741504josanneo22Game (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#import "game.h" vector<int> cnt(1500); void initialize(int n) { } int hasEdge(int u, int v) { int nw=max(u,v); return ++cnt[nw]==nw; }

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

game.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import "game.h"
      |  ^~~~~~
game.cpp:2:1: error: 'vector' does not name a type
    2 | vector<int> cnt(1500);
      | ^~~~~~
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:5:12: error: 'max' was not declared in this scope
    5 |     int nw=max(u,v);
      |            ^~~
game.cpp:6:14: error: 'cnt' was not declared in this scope; did you mean 'int'?
    6 |     return ++cnt[nw]==nw;
      |              ^~~
      |              int