# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
259213 | dolphingarlic | One-Way Streets (CEOI17_oneway) | C++14 | 159 ms | 21336 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>
typedef long long ll;
using namespace std;
vector<pair<int, int>> graph[100001], compressed[100001];
pair<int, int> edges[100001];
bool visited[100001], bidir[100001], to_right[100001];
int tin[100001], tout[100001], low[100001], timer;
int cmp[100001], bit[100001];
int find(int A) {
while (cmp[A] != A) cmp[A] = cmp[cmp[A]], A = cmp[A];
return A;
}
void onion(int A, int B) {
cmp[find(A)] = find(B);
}
void bridge_dfs(int node, int parent = 0) {
visited[node] = true;
tin[node] = low[node] = ++timer;
for (pair<int, int> i : graph[node]) if (i.second != parent) {
if (visited[i.first]) low[node] = min(low[node], tin[i.first]);
else {
bridge_dfs(i.first, i.second);
low[node] = min(low[node], low[i.first]);
if (low[i.first] > tin[node]) bidir[i.second] = true;
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |