제출 #674248

#제출 시각아이디문제언어결과실행 시간메모리
674248Megumin2006경주 (Race) (IOI11_race)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define ed '\n' #define pb push_back #define int long long #define ii pair<int,int> #define fi first #define se second using namespace std; const int N = 2e5 + 10; ii lazy[N]; vector<ii> g[N]; int n, k, ans = 1e18; map<int, int> f[N]; void Merge(int u, int v) { if (f[u].size() < f[v].size()) { swap(lazy[u], lazy[v]); f[u].swap(f[v]); } for(pair<int, int> tmp: f[v]) { int num = tmp.fi + lazy[v].fi; int Min = tmp.se + lazy[v].se; auto t = f[u].find(k - num - lazy[u].fi); if (t != f[u].end()) { if (t->se + Min + lazy[u].se < ans) { ans = t->se + Min + lazy[u].se; } } if (f[u][num - lazy[u].fi] == 0) f[u][num - lazy[u].fi] = Min - lazy[u].se; else { if (Min - lazy[u].se < f[u][num - lazy[u].fi]) { f[u][num - lazy[u].fi] = Min - lazy[u].se; } } } } void dfs(int u, int p, int val) { f[u][0] = 0; for(ii &e: g[u]) if (e.fi != p) { dfs(e.fi, u, e.se); Merge(u, e.fi); } lazy[u].fi += val; lazy[u].se ++; } int best_path(int N, int K, int H[][2], int L[]) { return 1; }

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

/usr/bin/ld: /tmp/ccuLcITF.o: in function `main':
grader.cpp:(.text.startup+0x28): undefined reference to `best_path(int, int, int (*) [2], int*)'
collect2: error: ld returned 1 exit status