제출 #799705

#제출 시각아이디문제언어결과실행 시간메모리
799705IvanJ게임 (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#include "game.h" const int maxn = 1505; int n; int c[maxn]; void initialize(int n) { ::n = n; } int hasEdge(int u, int v) { if(u > v) swap(u, v); c[u]++; if(c[u] > u) return 1; return 0; }

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

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:13:15: error: 'swap' was not declared in this scope
   13 |     if(u > v) swap(u, v);
      |               ^~~~