# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
967349 | Tuanlinh123 | Construction of Highway (JOI18_construction) | C++17 | 417 ms | 20760 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>
#define ll int
#define pll pair<ll, ll>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define ld long double
#define sz(a) ((ll)(a).size())
using namespace std;
const ll maxn=100005;
vector <pll> edges;
vector <ll> A[maxn];
ll a[maxn], h[maxn], dep[maxn];
ll Time, tin[maxn], tout[maxn], pa[maxn];
void dfs(ll u)
{
tin[u]=++Time;
for (ll v:A[u])
if (v!=pa[u])
dep[v]=dep[u]+1, pa[v]=u, dfs(v);
tout[u]=Time;
}
namespace SegTree
{
ll n;
pll St[maxn*4];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |