# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
43352 | ffresh | 전압 (JOI14_voltage) | C++14 | 174 ms | 54596 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;
const int N = 1e5+15,M = 2e5+15;
vector<int> adj[N];
int dp2[N],dp[N],depth[N];
bool vis[N];
stack<int> st;
int parent[N];
int a[M],b[M];
bool used[M];
void dfs(int root){
vis[root]= 1;
st.push(root);
for(int i=0;i<adj[root].size();++i){
int id = adj[root][i];
int u = a[id]^b[id]^root;
if(!vis[u]){
used[id]= 1;
parent[u] = root;
depth[u] = depth[root]+1;
dfs(u);
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... |