제출 #128378

#제출 시각아이디문제언어결과실행 시간메모리
128378SoSooding게임 (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#include "game.h" const int N = 1501; int deg[N]; void initialize(int n) { for(int i = 0;i < n;i++)deg[i] = n-1; } int hasEdge(int u, int v) { int mx = max(u, v); deg[u]++; if(deg[u] == u) return 1; return 0; }

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

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:11:14: error: 'max' was not declared in this scope
     int mx = max(u, v);
              ^~~
game.cpp:11:14: note: suggested alternative: 'mx'
     int mx = max(u, v);
              ^~~
              mx
game.cpp:11:9: warning: unused variable 'mx' [-Wunused-variable]
     int mx = max(u, v);
         ^~