Submission #101117

#TimeUsernameProblemLanguageResultExecution timeMemory
101117gs14004City (JOI17_city)C++17
Compilation error
0 ms0 KiB
#include "Encoder.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 250005; vector<int> gph[MAXN]; int dfn[MAXN], sz[MAXN], piv; void dfs(int x, int p){ sz[x] = 1; dfn[x] = ++piv; for(auto &i : gph[x]){ if(i != p){ dfs(i, x); sz[x] += sz[i]; } } } void Encode(int N, int A[], int B[]){ for(int i=0; i<N-1; i++){ gph[A[i]].push_back(B[i]); gph[B[i]].push_back(A[i]); } dfs(0, -1); for (int i = 0; i < N; ++i) { Code(i, ((long long)dfn[i] << 18) + sz[i]); } }

Compilation message (stderr)

/tmp/cc4lN1p5.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