제출 #420916

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4209162021-06-08 14:53:13JooTraffic (IOI10_traffic)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N = 1e6+10;
int dp[N],sum[N],val[N],sumall;
vector<int> vec[N];
void fisum(int u, int p){
sum[u] = val[u];
sumall += val[u];
for(int v : vec[u]){
if(v == p) continue;
fisum(v, u);
sum[u] += sum[v];
}
}
void solve(int u, int p){
int res = -1e18;
for(int v : vec[u]){
if(v == p) continue;
solve(v, u);
dp[u] = min(dp[u], dp[v]);
res = max(res, sum[v]);
}
res = max(res, sumall-sum[u]);
dp[u] = min(dp[u], res);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

/usr/bin/ld: /tmp/ccsYdiMx.o: in function `main':
grader.cpp:(.text.startup+0xe1): undefined reference to `LocateCentre(int, int*, int*, int*)'
collect2: error: ld returned 1 exit status