# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
163339 | alishahali1382 | One-Way Streets (CEOI17_oneway) | C++14 | 128 ms | 18288 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>
#pragma GCC optimize ("O2,unroll-loops")
using namespace std;
typedef pair<int, int> pii;
#define pb push_back
const int MAXN = 100010;
int n, m, k, u, v, x, y, t, a, b;
int val[MAXN];
char ans[MAXN];
int E[MAXN][2];
int H[MAXN];
int comp[MAXN];
vector<pii> G[MAXN];
vector<int> G2[MAXN], bridge;
int Bridge(int node, int par, int parid){
int res=H[node]=H[par]+1;
for (pii p:G[node]) if (p.second!=parid){
int v=p.first, i=p.second;
if (H[v]){
res=min(res, H[v]);
ans[i]='B';
}
else res=min(res, Bridge(v, node, i));
}
if (res<H[node]){
ans[parid]='B';
G2[par].pb(node);
G2[node].pb(par);
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... |