Submission #117097

#TimeUsernameProblemLanguageResultExecution timeMemory
117097Mamnoon_SiamCity (JOI17_city)C++17
Compilation error
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); }

Compilation message (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