제출 #658368

#제출 시각아이디문제언어결과실행 시간메모리
658368jiahng기지국 (IOI20_stations)C++14
컴파일 에러
0 ms0 KiB
//#include "stations.h"
#include <vector>
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int,int> pi;
typedef vector <int> vi;
typedef vector <pi> vpi;
typedef pair<pi, ll> pii;
typedef set <ll> si;
typedef long double ld;
#define f first
#define s second
#define mp make_pair
#define FOR(i,s,e) for(int i=s;i<=int(e);++i)
#define DEC(i,s,e) for(int i=s;i>=int(e);--i)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define lbd(x, y) lower_bound(all(x), y)
#define ubd(x, y) upper_bound(all(x), y)
#define aFOR(i,x) for (auto i: x)
#define mem(x,i) memset(x,i,sizeof x)
#define fast ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define maxn 200010
#define INF (ll)1e9
#define MOD 1000000007
typedef pair <vi, int> pvi;
typedef pair <int,pi> ipi;
typedef vector <pii> vpii;

vi labels;
int co = 0;
vi adj[maxn];
void dfs(int x,int p, bool f){
   if (f) labels[x] = co++; 
   aFOR(i, adj[x]) if (i != p) dfs(i,x,!f);
   if (!f) labels[x] = co++;
}
std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) {
    FOR(i,0,n-1) adj[i].clear();
    co = 0;
    FOR(i,0,n-2){
        adj[u[i]].pb(v[i]);
        adj[v[i]].pb(u[i]);
    }
    labels = vi(n, 0);
    dfs(0,-1,1);
    /*
    cout << "LABELS: ";
    aFOR(i, labels) cout << i << ' ';
    cout << '\n';
    */
	return labels;
}

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

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