# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
849287 | manhtuan22007 | Race (IOI11_race) | C++14 | 73 ms | 176464 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 name "race"
#define ll long long
//#define int long long
int n , k;
vector<vector<pair<int , int>>> g(200010);
namespace sub12{
const int maxn = 1e3 + 10;
int par[maxn][11] , h[maxn] , cost[maxn];
void dfs(int u){
for(auto e : g[u]){
int v = e.first;
if(v == par[u][0]) continue;
h[v] = h[u] + 1;
cost[v] = cost[u] + e.second;
par[v][0] = u;
for(int i = 1 ; i < 11 ; i ++){
par[v][i] = par[par[v][i - 1]][i - 1];
}
dfs(v);
}
}
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... |