제출 #479939

#제출 시각아이디문제언어결과실행 시간메모리
479939robellTraffic (IOI10_traffic)C++17
컴파일 에러
0 ms0 KiB
#pragma GCC optimize("O2") #include <bits/stdc++.h> #include "traffic.h" #include "grader.h" #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; typedef tree<int,null_type,less<int>,rb_tree_tag, tree_order_statistics_node_update> indexed_set; typedef long long ll; #define pb push_back #define eb emplace_back #define countbits __builtin_popcount #define beg0 __builtin_clz #define terminal0 __builtin_ctz int mod=1e9+7; void setIO(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); } void setIO(string f){ freopen((f+".in").c_str(),"r",stdin); freopen((f+".out").c_str(),"w",stdout); setIO(); } int bpop[(int)1e6];//pop in subtree int bcong[(int)1e6];//max congestion in subtree int cong[(int)1e6];//tot max congestion int tot = 0; int p[(int)1e6]; vector<int> l[(int)1e6]; void findSub(int ind, int parent){ int maxV = 0; int subT = p[ind]; for (int j:l[ind]){ if (j!=parent){ findSub(j,ind); maxV=max(maxV,bcong[j]+p[j]); subT+=bpop[j]; } } bcong[ind]=maxV; bpop[ind]=subT; } void dfs(int ind, int parent, int above){ if (ind==0){ int totP=bpop[0]; cong[0]=bcong[0]; for (int j:l[0]){ dfs(j,ind,totP-bpop[j]); } }else{ cong[ind]=max(bcong[ind],above);above+=p[ind]; for (int j:l[ind]){ if (j!=parent){ dfs(j,ind,above); } } } } void LocateCentre(int N, int P[], int S[], int D[]){ memset(bpop,0,sizeof(bpop)); memset(bcong,0,sizeof(bcong)); memset(cong,-1,sizeof(cong)); for (int i=0;i<N;i++) p[i]=P[i]; for (int i=0;i<N-1;i++){ l[S[i]].pb(D[i]); l[D[i]].pb(S[i]); } findSub(0,0); dfs(0,0,0); int ind = -1; int maxV = -1; for (int i=0;i<N;i++){ if (cong[i]>maxV) maxV=cong[i],ind=i; } return ind; }

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

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