Submission #545408

#TimeUsernameProblemLanguageResultExecution timeMemory
545408AJ00Game (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "game.h" using namespace std; int n; int hasEdge(int u, int v){ cnt[u]++; cnt[v]++; if (cnt[u] == n || cnt[v] == n){ return 1; } return 0; } void intialise(int N){ n = N; vector<int> cnt(n); for (int i = 0; i < n; i++){ cnt[i] = 0; } }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:6:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
    6 |     cnt[u]++;
      |     ^~~
      |     int