# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
205361 | TadijaSebez | Olympic Bus (JOI20_ho_t4) | C++11 | 396 ms | 4856 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 long long
#define pb push_back
const int N=205;
const int M=50050;
const int inf=2e9+7;
struct Edge{int u,v,c,d;};
Edge edges[M];
bool bridge[M];
struct Bridges{
static const int NSZ=205;
vector<pair<int,int>> E[NSZ];
vector<int> ans;
int n,disc[NSZ],low[NSZ],tid;
void init(int _n){n=_n;tid=0;ans.clear();for(int i=1;i<=n;i++)E[i].clear(),disc[i]=low[i]=0;}
void AddEdge(int u,int v,int e){E[u].pb({v,e});E[v].pb({u,e});}
void DFS(int u,int p){
disc[u]=low[u]=++tid;
for(auto e:E[u])if(e.second!=p){
int v=e.first;
if(!disc[v]){
DFS(v,e.second);
if(low[v]>disc[u])ans.pb(e.second);
low[u]=min(low[u],low[v]);
}else low[u]=min(low[u],disc[v]);
}
}
}GPH;
void FindBridges(vector<pair<int,int>> go[],int st,int n){
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... |