Submission #799705

#TimeUsernameProblemLanguageResultExecution timeMemory
799705IvanJGame (IOI14_game)C++17
Compilation error
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; }

Compilation message (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);
      |               ^~~~