Submission #15682

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
156822015-07-15 05:31:54progressiveRace (IOI11_race)C++14
100 / 100
1724 ms67932 KiB
#include "race.h"
#include <vector>
#include <queue>
#include <set>
#include <cstdio>
#include <algorithm>
using namespace std;
static const int MAXN=262144;
static set<int> conn[MAXN];
static int H[MAXN][2];
static int L[MAXN];
static int N,K;
//N: number of city K: length of course, H, L:city and cost
static int size[MAXN];
static int maxchild[MAXN];
vector<int> ele;
int dfs(int v,int pa)
{
ele.push_back(v);
size[v]=1;
maxchild[v]=0;
for(int Eno:conn[v])
{
int target=H[Eno][0]^H[Eno][1]^v;
if(target==pa) continue;
int ret=dfs(target,v);
maxchild[v]=max(maxchild[v],ret);
size[v]+=ret;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...