# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
527696 | beepbeepsheep | Pipes (CEOI15_pipes) | C++17 | 1043 ms | 8244 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;
#define ll int
#define ii pair<ll,ll>
#define endl '\n'
const ll inf=1e15;
const ll mod=1e9+7;
const ll maxn=1e5+5;
vector<ll> adj[maxn];
ll cnt[maxn],depth[maxn],low[maxn];
ll par[maxn][2];
int root(ll x, ll l){
if (par[x][l]==x) return x;
return par[x][l]=root(par[x][l],l);
}
bool connect(ll a, ll b, ll l){
if (root(a,l)==root(b,l)) return 0;
par[root(a,l)][l]=root(b,l);
return 1;
}
void dfs(ll node, ll p){
for (auto &u:adj[node]){
if (depth[u]==-1){
depth[u]=depth[node]+1;
dfs(u,node);
if (low[u]>depth[node]){
cout<<node<<' '<<u<<endl;
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |