제출 #1217644

#제출 시각아이디문제언어결과실행 시간메모리
1217644cpdreamer기지국 (IOI20_stations)C++20
컴파일 에러
0 ms0 KiB
#include "stations.h" #include <bits/stdc++.h> using namespace std; const long long INF = 1e17; typedef long long ll; const ll MOD = (ll)1e9+7; #define P pair #define S second #define F first #define pb push_back #define V vector #define all(v) v.begin(), v.end() V<int>adj[(int)1000]; V<P<int,int>>vp(1000); int dep[1000]; int cnt=0; void dfs(int n,int p) { vp[n].F=cnt; for (auto u:adj[n]) { if(u==p)continue; cnt++; dep[u]=dep[n]+1; dfs(u,n); } cnt++; vp[n].S=cnt; } std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) { cnt=0; dep[0]=0; for (int i=0;i<n-1;i++) { adj[u[i]].pb(v[i]); adj[v[i]].pb(u[i]); } dfs(0,-1); V<int>l(n); for (int i=0;i<n;i++) { if (dep[i]%2==0) { l[i]=vp[i].F; } else l[i]=vp[i].S; } for (int i=0;i<n;i++) { adj[i].clear(); } return l; }

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

/usr/bin/ld: /tmp/cc08xKjo.o: in function `main':
stub.cpp:(.text.startup+0x4fc): undefined reference to `find_next_station(int, int, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status