제출 #1080530

#제출 시각아이디문제언어결과실행 시간메모리
1080530kwongwengCity (JOI17_city)C++17
컴파일 에러
0 ms0 KiB
#include "Encoder.h" #include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef long long ll; #define FOR(i,a,b) for(int i=a; i<b; i++) #define ROF(i,a,b) for(int i=a; i>=b; i--) #define pb push_back const ll N = 125000; vi g[N], p(N); vector<ll> sz(N), tin(N); int cnt = 0; void dfs(int u){ sz[u]=1; for (int v : g[u]){ if (p[u]==v) continue; p[v]=u; dfs(v); sz[u] += sz[v]; } } bool cond(int u, int v){ return sz[u]<sz[v]; } void dfs2(int u){ tin[u] = cnt++; for (int v : g[u]){ if (p[u]==v) continue; p[v]=u; dfs2(v); } if (sz[u] >= N/2) Code(u,tin[u]*N); else Code(u,tin[u]*N + sz[u]); } void Encode(int n, int A[], int B[]) { FOR(i,0,n-1){ g[A[i]].pb(B[i]); g[B[i]].pb(A[i]); } dfs(0); FOR(i,0,n){ sort(g[i].begin(), g[i].end(), cond); } dfs2(0); }

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

/usr/bin/ld: /tmp/ccjwxCuO.o: in function `main':
grader_device.cpp:(.text.startup+0xf8): undefined reference to `InitDevice()'
/usr/bin/ld: grader_device.cpp:(.text.startup+0x19b): undefined reference to `Answer(long long, long long)'
collect2: error: ld returned 1 exit status