# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
580858 | benson1029 | Race (IOI11_race) | C++14 | 3 ms | 5076 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;
vector< pair<int,int> > edg[200005];
int k;
bool solved[200005];
int mxdeg, centroid;
vector< pair<long long, int> > v, v2;
int ans = 1e9;
void findcentroid(int x, int p) {
int deg = 0;
if(p!=-1) ++deg;
for(auto i:edg[x]) {
if(!solved[i.first] && i.first!=p) {
findcentroid(i.first, x);
++deg;
}
}
if(deg > mxdeg) {
mxdeg = deg;
centroid = x;
}
}
void solve(int x);
void findandsolve(int x) {
mxdeg = -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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |