# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
715996 | ovidiush11 | 경주 (Race) (IOI11_race) | C++14 | 461 ms | 82748 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>
#include "race.h"
using namespace std;
const int N_ = 2e5+1;
vector<vector<pair<int,int>>> a;
map<int,int> mp[N_];
int n,k,len[N_],sum[N_],ans = 1e9;
void dfs(int pos,int last,int ln,int sm)
{
len[pos] = ln;
sum[pos] = sm;
mp[pos][sm] = ln;
for(auto x : a[pos])
{
if(x.first == last)continue;
dfs(x.first,pos,ln+1,sm+x.second);
}
return ;
}
void solve(int pos,int last)
{
int K = k + 2 * sum[pos];
for(auto v : a[pos])
{
if(v.first == last)continue;
# | 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... |