# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
944578 | irmuun | Race (IOI11_race) | C++17 | 1716 ms | 79688 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;
#define ll long long
#define pb push_bacK
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()
const ll maxn=2e5+5;
int n=0;
set<pair<int,int> >adj[maxn];
vector<ll>sz(maxn),d(maxn);
void calc(int x,int p){
n++;
sz[x]=1;
for(auto [y,w]:adj[x]){
if(y!=p){
calc(y,x);
sz[x]+=sz[y];
}
}
}
int centroid(int x,int p){
for(auto [y,w]:adj[x]){
# | 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... |