# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
229872 | DavidDamian | Race (IOI11_race) | C++11 | 0 ms | 0 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 "race.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
struct edge
{
ll to;
ll w;
};
vector<edge> adjList[200005];
ll Size[200005];
ll getSize(ll u,ll p)
{
Size[u]=1;
for(edge e: adjList[u]){
ll v=e.to;
if(v==p) continue;
Size[u]+=getSize(v,u);
}
return Size[u];
}
ll k;
ll minimum=LLONG_MAX;
map<ll,ll>* sack[200005];
typedef pair<ll,ll> pii;
void dfs(ll u,ll p,ll distRoot,ll depth)
{
//cout<<u<<" "<<p<<" "<<distRoot<<" "<<depth<<endl;
ll greatest=0,bigChild=-1;
for(edge e: adjList[u]){