# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
460427 | ak2006 | Putovanje (COCI20_putovanje) | C++14 | 299 ms | 59800 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;
using ll = long long;
using vb = vector<bool>;
using vvb = vector<vb>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vvvl = vector<vvl>;
const ll mod = 1e9 + 7,inf = 1e18;
#define pb push_back
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
void setIO()
{
fast;
}
ll n = 2e5 + 5,TIMER;
vvvl adj(n);
vvi anc(n,vi(21));
vl pref(n);
vl in(n),out(n),weight1ToParent(n),weight2ToParent(n);
void dfs(int u,int p)
{
in[u] = ++TIMER;
anc[u][0] = p;
for (int i = 1;i<=20;i++)anc[u][i] = anc[anc[u][i - 1]][i - 1];
for (auto val:adj[u]){
int v = val[0];
if (v != p){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |