제출 #97122

#제출 시각아이디문제언어결과실행 시간메모리
97122maruiiSnowy Roads (JOI16_snowy)C++17
컴파일 에러
0 ms0 KiB
#include "Borislib.h" #include <bits/stdc++.h> using namespace std; #define ff first #define ss second vector<int> edge[500]; int A[500], B[500], prt[500]; static int getL; void dfs(int x){ for(auto &i: edge[x]){ if(prt[x]==i) continue; prt[i] = x; dfs(i); } } void InitBoris(int N , int AA[] , int BB[]) { for(int i=0; i<N; ++i) edge[i].clear(); for(int i=0; i<N; ++i){ A[i] = AA[i], B[i] = BB[i]; edge[A[i]].push_back(B[i]); edge[B[i]].push_back(A[i]); } for(int i=0; i<N; ++i) sort(edge[i].begin(), edge[i].end()); dfs(0); } int Boris(int city) { int ret = 0; while(city) ret += Ask(city), city = prt[city]; return Ask(city); }

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

Anya.cpp:8:12: warning: 'getL' defined but not used [-Wunused-variable]
 static int getL;
            ^~~~
/tmp/ccNr77g2.o: In function `Boris(int)':
Anya.cpp:(.text+0xa3): undefined reference to `Ask(int)'
Anya.cpp:(.text+0xb7): undefined reference to `Ask(int)'
/tmp/ccj8b3YA.o: In function `main':
grader_anya.cpp:(.text.startup+0xc5): undefined reference to `InitAnya(int, int*, int*)'
grader_anya.cpp:(.text.startup+0x196): undefined reference to `Anya(int*)'
collect2: error: ld returned 1 exit status

/tmp/ccA6nvmY.o: In function `main':
grader_boris.cpp:(.text.startup+0x1b1): undefined reference to `InitBoris(int, int*, int*)'
grader_boris.cpp:(.text.startup+0x2be): undefined reference to `Boris(int)'
collect2: error: ld returned 1 exit status