Submission #518701

#TimeUsernameProblemLanguageResultExecution timeMemory
518701EveruleGame (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> //#include "game.h" using namespace std; using ll = long long; vector<vector<int>> g; vector<bool> vis; int n; void initialize(int _n) { n = _n; g.resize(n, vector<int>(n, 1)); } int hasEdge(int u, int v) { g[u][v] = 0; vis.assign(n, 0); dfs(0); return g[u][v] = (accumulate(vis.begin(), vis.end(), 0) != n); } void dfs(int u){ vis[u] = 1; for(int v=0;v<n;v++){ if(g[u][v] && !vis[v]) dfs(v); } }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:16:5: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
   16 |     dfs(0);
      |     ^~~
      |     ffs