# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
13128 | gs14004 | 관광지 (IZhO14_shymbulak) | C++14 | 1500 ms | 20704 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 <cstdio>
#include <vector>
#include <algorithm>
#include <deque>
#include <utility>
#include <queue>
using namespace std;
typedef pair<int,int> pi;
int n;
vector<int> graph[200005];
int low[200005], dfn[200005], piv;
int is_cyc[200005];
void dfs(int x, int pa){
low[x] = dfn[x] = ++piv;
for (int i=0; i<graph[x].size(); i++) {
if(graph[x][i] == pa) continue;
if(dfn[graph[x][i]]){
is_cyc[graph[x][i]] = 1;
low[x] = min(low[x],dfn[graph[x][i]]);
}
else{
dfs(graph[x][i],x);
low[x] = min(low[x],low[graph[x][i]]);
}
}
if(low[x] < dfn[x]) is_cyc[x] = 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |