# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
766507 | dxz05 | Shymbulak (IZhO14_shymbulak) | C++17 | 69 ms | 19732 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;
vector<vector<int>> g;
vector<int> color;
vector<int> cycle;
stack<int> st;
bool dfs0(int v, int p){
st.push(v);
color[v] = 1;
for (int u : g[v]){
if (u == p) continue;
if (color[u] == 0){
if (dfs0(u, v)) return true;
}
if (color[u] == 1){
while (!st.empty()){
int x = st.top();
st.pop();
cycle.push_back(x);
if (x == u) break;
}
return true;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |