Submission #1305807

#TimeUsernameProblemLanguageResultExecution timeMemory
1305807jojeonghoon게임 (APIO22_game)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "game.h" using namespace std; int D[LM]; int dfs(int x, int w){ w+=x<K; if(D[x]) return 1; D[x]=w; for(int i:G[x]){ if(dfs(i,w)) return 1; } return 0; } int add_teleporter(int u, int v){ G[u].push_back(v); fill(D,D+N,0); D[u]=1; return dfs(v,1); }

Compilation message (stderr)

game.cpp:4:7: error: 'LM' was not declared in this scope
    4 | int D[LM];
      |       ^~
game.cpp: In function 'int dfs(int, int)':
game.cpp:6:10: error: 'K' was not declared in this scope
    6 |     w+=x<K;
      |          ^
game.cpp:7:8: error: 'D' was not declared in this scope
    7 |     if(D[x]) return 1;
      |        ^
game.cpp:8:5: error: 'D' was not declared in this scope
    8 |     D[x]=w;
      |     ^
game.cpp:9:15: error: 'G' was not declared in this scope
    9 |     for(int i:G[x]){
      |               ^
game.cpp: In function 'int add_teleporter(int, int)':
game.cpp:17:5: error: 'G' was not declared in this scope
   17 |     G[u].push_back(v);
      |     ^
game.cpp:18:10: error: 'D' was not declared in this scope
   18 |     fill(D,D+N,0);
      |          ^
game.cpp:18:14: error: 'N' was not declared in this scope
   18 |     fill(D,D+N,0);
      |              ^