# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
103707 | E869120 | One-Way Streets (CEOI17_oneway) | C++14 | 838 ms | 62036 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 <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
#pragma warning (disable: 4996)
int N, M, A[1 << 18], B[1 << 18], pre[1 << 18], low[1 << 18], col[1 << 18], dp[1 << 17][22], dist[1 << 17], cnt[1 << 17], state[1 << 17], cnts;
map<pair<int, int>, int>Map, Map2;
vector<int>X[1 << 17], Y[1 << 17], Z[1 << 17];
bool bridge[1 << 18], dir[1 << 18], used[1 << 18];
void dfs1(int pos, int prev_) {
cnts++; pre[pos] = cnts; low[pos] = cnts;
for (int i = 0; i < X[pos].size(); i++) {
if (pre[X[pos][i]] >= 1) {
if (X[pos][i] != prev_) low[pos] = min(low[pos], low[X[pos][i]]);
continue;
}
else {
dfs1(X[pos][i], pos);
low[pos] = min(low[pos], low[X[pos][i]]);
if (low[X[pos][i]] == pre[X[pos][i]]) {
bridge[abs(Map[make_pair(pos, X[pos][i])])] = true;
}
}
}
}
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... |