# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
172748 | nicolaalexandra | One-Way Streets (CEOI17_oneway) | C++14 | 1072 ms | 84716 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 DIM 100010
using namespace std;
int whatChain[DIM],positionInChain[DIM],chainFatherNode[DIM],level[DIM],Size[DIM];
int viz[DIM],low[DIM],niv[DIM],b[DIM],E[DIM*3],first[DIM];
pair <int,int> rmq[20][DIM*3],mch[DIM];
vector <int> chains[DIM],L[DIM],edg[DIM],aint[DIM];
map < pair<int,int>, int > mch_critica,cnt;
deque <int> s;
int n,m,p,i,j,x,y,k,lca;
int nr_chains;
void dfs (int nod, int tata){
viz[nod] = 1;
low[nod] = niv[nod] = 1+niv[tata];
s.push_back (nod);
for (auto vecin:edg[nod]){
if (vecin == tata)
continue;
if (viz[vecin])
low[nod] = min (low[nod],niv[vecin]);
else {
dfs (vecin,nod);
low[nod] = min (low[nod],low[vecin]);
if (low[vecin] >= niv[nod]){
int x, cnt = 1;
do{
cnt++;
x = s.back();
s.pop_back();
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... |