제출 #1200910

#제출 시각아이디문제언어결과실행 시간메모리
1200910PlayVoltz기지국 (IOI20_stations)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define pii pair<int, int> #define mp make_pair #define pb push_back #define fi first #define se second int counter; vector<int> res; vector<vector<int> > graph; void dfs(int node, int p, bool a){ if (!a)res[node]=++counter; for (auto num:graph[node])if (num!=p)dfs(num, node, !a); if (a)res[node]=++counter; } vector<int> label(int n, int k, vector<int> u, vector<int> v) { graph.clear(); res.clear(); counter=-1; graph.resize(n); res.resize(n); for (int i=0; i<n-1; ++i){ graph[v[i]].pb(u[i]); graph[u[i]].pb(v[i]); } dfs(0, 0, 0); return res; }

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

/usr/bin/ld: /tmp/ccmmy4P5.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