제출 #528252

#제출 시각아이디문제언어결과실행 시간메모리
528252AlexRex0Traffic (IOI10_traffic)C++14
컴파일 에러
0 ms0 KiB
#include "grader.h" #include <bits/stdc++.h> using namespace std; vector<int> g[1000002]; long long int congestion[1000002]; long long int ans = -1, posAns = -1; long long int dfs(int nodo, int padre, int pp[]){ long long int suma = pp[nodo]; for(int i = 0; i < g[nodo].size(); ++i){ int sig = g[nodo][i]; if(sig != padre){ suma+= dfs(sig, nodo, pp); } } congestion[nodo] = suma; return suma; } void dfs2(int nodo, int padre){ if(nodo != 0){ long long int M = max(congestion[0] - congestion[nodo], congestion[nodo]); if(M < ans){ ans = M; posAns = nodo; } } for(int i = 0; i < g[nodo].size(); ++i){ int sig = g[nodo][i]; if(sig != padre){ dfs2(sig, nodo); } } } int LocateCentre(int N, int pp[], int S[], int D[]) { for(int i = 0; i < N - 1; ++i){ g[S[i]].push_back(D[i]); g[D[i]].push_back(S[i]); } dfs(0, -1, pp); posAns = 0; ans = congestion[0]; dfs2(0, -1); return posAns; }

컴파일 시 표준 에러 (stderr) 메시지

traffic.cpp:1:10: fatal error: grader.h: No such file or directory
    1 | #include "grader.h"
      |          ^~~~~~~~~~
compilation terminated.