제출 #662556

#제출 시각아이디문제언어결과실행 시간메모리
662556esomerTraffic (IOI10_traffic)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> #include "traffic.h" #include "grader.h" using namespace std; #define ll long long #define endl "\n" const int MOD = 998244353; int mn, city, total; int DFS(int x, vector<int>& v, vector<vector<int>>& adj, int p){ int subtree = 0; int mx = 0; for(int node : adj[x]){ if(node == p) continue; int sz = DFS(node, v, adj, x); mx = max(mx, sz); subtree += sz; } mx = max(mx, total - sz - v[x]); if(mx < mn){ mn = mx; city = x; } return subtree + v[x]; } int LocateCentre(int n, int* P, int* S, int* D){ vector<int> v(n); vector<vector<int>> adj(n); total = 0; for(int i = 0; i < n; i++) {v[i] = P[i]; total += v[i];} for(int i = 0; i < n - 1; i++){ adj[S[i]].push_back(D[i]); adj[D[i]].push_back(S[i]); } mn = 2e9; DFS(0, v, adj, -1); return city; }

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

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