# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
63015 | zubec | Race (IOI11_race) | C++14 | 1818 ms | 80492 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;
const int N = 200100;
vector <pair<int, int> > g[200100];
int needLen, n, sz[N], pr[N];
bool used[N];
int ans = 1e9;
map<int, int> mp1;
int fnd_cntr(int v, int p, int szcmp){
int pos = -1;
bool bb = 0;
for (int i = 0; i < g[v].size(); i++){
int to = g[v][i].first;
if (to == p || used[to])
continue;
if (sz[to]-1 >= szcmp/2){
bb = 1;
pos = to;
break;
}
}
if (bb == 0)
return v;
return fnd_cntr(pos, v, szcmp);
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... |