제출 #1018290

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
10182902024-07-09 18:17:41gutzzyTraffic (IOI10_traffic)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "traffic.h"
using namespace std;
vector<int> dp;
vector<vector<int>> lst;
pair<int,int> ans;
int calc(int nodo, int padre, vector<int> &p){
if(dp[nodo]!=-1) return dp[nodo];
int res = p[nodo];
for(auto vecino:lst[nodo]){
if(vecino!=padre) res += calc(vecino,nodo,p);
}
dp[nodo] = res;
return dp[nodo];
}
void dfs(int nodo, int padre, vector<int> &p){
dp[padre] = -1;
int res = 0;
for(auto vecino:lst[nodo]){
res = max(res, calc(vecino,nodo,p));
}
//cout << "arena: " << nodo << " res: " << res << endl;
if(res<ans.second){
//cout << "update! new arena: " << nodo << " " << res << endl;
ans.second = res;
ans.first = nodo;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

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