# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
115752 | YazanZk | Race (IOI11_race) | C++14 | 0 ms | 0 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>
typedef long long ll ;
using namespace std;
const int N = 200005;
vector < pair < int , int > > G[N];
int sub[N] , par[N];
bool blocked[N];
int n , k ;
void get_size(int u, int p){
par[u] = p ;
sub[u] = 1 ;
for(auto ch : G[u]){
int v = ch.first;
if(v == p || blocked[v]) continue ;
get_size(v , u);
sub[u] += sub[v];
}
}
set < pair < int , int > > se;
int dfs(int u , int p , ll w , int d){
if(w > k) return n ;