Submission #1208455

#TimeUsernameProblemLanguageResultExecution timeMemory
1208455fskaricaGame (APIO22_game)C++20
Compilation error
0 ms0 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define fi first #define se second #define pii pair<int, int> const int INF = 1e9; const int MAX = 1e5 + 10; int n, k; int in[MAX], out[MAX]; vector<int> veze[MAX], vezeRev[MAX]; void init(int N, int K) { n = N; k = K; for (int i = 0; i < n; i++) { if (i < k) { in[i] = i; out[i] = i; } else { in[i] = -1; out[i] = INF; } } } void rekIn(int u, int novo) { if (in[u] >= novo) return; in[u] = novo; for (int v : veze[u]) { rekIn(v, novo); } } void rekOut(int u, int novo) { if (out[u] <= novo) return; out[u] = novo; for (int v : vezeRev[u]) { rekOut(v, novo); } } int add_teleporter(int x, int y) { if (x < k && y < k) { return x >= y; } veze[x].push_back(y); vezeRev[y].push_back(x); propagirajIn(y, in[x]); propagirajOut(x, out[y]); return in[x] >= out[y]; }

Compilation message (stderr)

game.cpp: In function 'int add_teleporter(int, int)':
game.cpp:60:5: error: 'propagirajIn' was not declared in this scope
   60 |     propagirajIn(y, in[x]);
      |     ^~~~~~~~~~~~
game.cpp:61:5: error: 'propagirajOut' was not declared in this scope
   61 |     propagirajOut(x, out[y]);
      |     ^~~~~~~~~~~~~