제출 #117097

#제출 시각아이디문제언어결과실행 시간메모리
117097Mamnoon_SiamCity (JOI17_city)C++17
컴파일 에러
0 ms0 KiB
#include "Encoder.h" #include <bits/stdc++.h> using namespace std; const int maxn = 1 << 18; const int half = 125001, full = 250000; vector<int> g[maxn]; int tym = 0; pair<int, int> optimize(int L, int R) { int diff = R - L; if(250000 - diff < diff) { diff = 250000 - diff; L = R; } return {L, diff}; } void dfs(int u, int p) { int L = tym++, R, l, diff; for(int v : g[u]) if(v - p) { dfs(v, u); } R = tym - 1; tie(l, diff) = optimize(L, R); Code(u, 1LL * l * 125001 + diff); } void Encode(int N, int A[], int B[]) { for(int i = 0; i < N - 1; i++) { int u = A[i], v = B[i]; g[u].emplace_back(v); g[v].emplace_back(u); } dfs(0, -1); }

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

/tmp/ccIS7lH6.o: In function `main':
grader_device.cpp:(.text.startup+0xe3): undefined reference to `InitDevice()'
grader_device.cpp:(.text.startup+0x16a): undefined reference to `Answer(long long, long long)'
collect2: error: ld returned 1 exit status