# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1144642 | mnbvcxz123 | Povjerenstvo (COI22_povjerenstvo) | C++20 | 609 ms | 149172 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define arr array
#define vec vector
#define pii pair<int, int>
#define fir first
#define sec second
const int N = 5e5 + 5;
int n, m;
arr<vec<int>, N> in, out;
arr<bool, N> tp_vs;
vec<int> tp;
void tp_dfs(int u) {
tp_vs[u] = true;
for (int v : out[u])
if (!tp_vs[v]) tp_dfs(v);
tp.push_back(u);
}
int nm_sccs;
arr<int, N> scc;
arr<vec<int>, N> scc_nds;
void scc_dfs(int u) {
scc[u] = nm_sccs, scc_nds[nm_sccs].push_back(u);
for (int v : in[u])
if (!scc[v]) scc_dfs(v);
}
void prcmp() {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |