# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
114684 | PeppaPig | One-Way Streets (CEOI17_oneway) | C++14 | 261 ms | 262144 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5+5;
int dsu[N];
int find(int x) { return dsu[x] = x == dsu[x] ? x : find(dsu[x]); }
int n, m, p;
int a[N], b[N];
vector<int> g[N];
int pre[N], low[N];
bitset<N> br;
void tarjan(int u, int p) {
static int idx = 0;
pre[u] = low[u] = ++idx;
for(int i : g[u]) {
int v = a[i] ^ b[i] ^ u;
if(v == p) continue;
if(!pre[v]) {
tarjan(v, u);
low[u] = min(low[u], low[v]);
if(low[v] > pre[u]) br[i] = true;
} else low[u] = min(low[u], pre[v]);
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |