# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
254544 | tinjyu | Race (IOI11_race) | C++14 | 650 ms | 47984 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 <iostream>
using namespace std;
long long int ans=99999999999,a[1000005],t[1000005][2],p,num,f[1000005],tag[1000005],son[1000005],n,k,map[1000005][3],road[1000005];
int build(int x,int fa)
{
son[x]=1;
f[x]=fa;
long long int g=road[x];
while(g!=-1)
{
long long int now=map[g][0];
if(now!=fa && tag[now]==0)
{
build(now,x);
son[x]+=son[now];
}
g=map[g][1];
}
}
int find(int x,int fa,long long int sum)
{
long long int g=road[x];
long long int can=1;
if(sum>num/2)can=0;
while(g!=-1)
{
long long int now=map[g][0];
if(now!=fa && tag[now]==0)
{
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... |