# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
350013 | arnold518 | Putovanje (COCI20_putovanje) | C++14 | 213 ms | 30460 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;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 2e5;
struct Edge
{
int u, v, p, q;
};
int N;
vector<Edge> adj[MAXN+10];
int par[MAXN+10][30], dep[MAXN+10];
int dp[MAXN+10];
void dfs(int now, int bef, int d)
{
par[now][0]=bef;
dep[now]=d;
for(auto nxt : adj[now])
{
if(nxt.v==bef) continue;
dfs(nxt.v, now, d+1);
}
}
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... |