제출 #241613

#제출 시각아이디문제언어결과실행 시간메모리
241613lakshith_Traffic (IOI10_traffic)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "traffic.h" #include "grader.h" #define pb push_back using namespace std; vector<vector<int>> adjList(1000,vector<int>()); int DFS(int n,int s,int* p){ int sum = p[n]; for(int x:adjList.at(n)) if(x!=s)sum += DFS(x,n,p); return sum; } int LocateCenter(int n,int p[],int s[],int d[]){ for(int i=0;i<n-1;i++){ adjList.at(s[i]).pb(d[i]); adjList.at(d[i]).pb(s[i]); } int MIN = INT_MAX; int minPos = 0; for(int i=0;i<n;i++){ int MAX = 0; for(int x:adjList.at(i)) MAX = max(MAX,DFS(x,i,p)); if(MAX < MIN){ MIN = MAX; minPos = i; } } return minPos; }

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

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