# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
593240 | chirathnirodha | 경주 (Race) (IOI11_race) | C++17 | 2775 ms | 80780 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;
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define P push
#define I insert
typedef long long ll;
const ll INF=10000000000000;
const int maxn=200000;
ll n,k;
int ans=INT32_MAX;
vector<pair<ll,ll> > v[maxn];
int parent[maxn];
int subsiz[maxn];
int len[maxn];
ll dist[maxn];
int dfs(int x,set<int> s){
subsiz[x]=1;
for(int i=0;i<v[x].size();i++){
int y=v[x][i].F;
if(parent[x]==y || s.count(y))continue;
parent[y]=x;
dist[y]=dist[x]+v[x][i].S;
len[y]=len[x]+1;
subsiz[x]+=dfs(y,s);
}
return subsiz[x];
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... |