# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
631826 | NintsiChkhaidze | One-Way Streets (CEOI17_oneway) | C++14 | 278 ms | 31144 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>
#define s second
#define f first
#define pb push_back
#define left (h<<1),l,((l+r)>>1)
#define right ((h<<1)|1),((l+r)>>1) + 1,r
using namespace std;
const int N = 100005;
int tin[N],low[N],a[N],b[N],ID[N],d[25][N];
int O[N],C[N];
bool bridge[N],vis[N];
vector <int> adj[N],vec[N];
vector <pair<int,int> > v[N];
int idx,cnt,n;
void dfs(int x,int par){
vis[x] = 1;
tin[x] = low[x] = cnt++;
for (auto [to,id]: v[x]){
if (to == par) continue;
if (vis[to]){
low[x] = min(low[x], tin[to]);
}else{
dfs(to,x);
low[x] = min(low[x], low[to]);
if (low[to] > tin[x]) bridge[id] = 1;
}
}
}
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... |