제출 #1186210

#제출 시각아이디문제언어결과실행 시간메모리
1186210raspyNile (IOI24_nile)C++20
컴파일 에러
0 ms0 KiB
#include "nile.h" #include <cassert> #include <cstdio> #include <vector> int main() { int N; assert(1 == scanf("%d", &N)); std::vector<int> W(N), A(N), B(N); for (int i = 0; i < N; i++) assert(3 == scanf("%d%d%d", &W[i], &A[i], &B[i])); int Q; assert(1 == scanf("%d", &Q)); std::vector<int> E(Q); for (int j = 0; j < Q; j++) assert(1 == scanf("%d", &E[j])); fclose(stdin); std::vector<long long> R = calculate_costs(W, A, B, E); int S = (int)R.size(); for (int j = 0; j < S; j++) printf("%lld\n", R[j]); fclose(stdout); return 0; }

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

/usr/bin/ld: /tmp/ccAJoqNJ.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccrfwrt1.o:nile.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccrfwrt1.o: in function `main':
nile.cpp:(.text.startup+0x1d5): undefined reference to `calculate_costs(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
/usr/bin/ld: /tmp/ccAJoqNJ.o: in function `main':
grader.cpp:(.text.startup+0x30e): undefined reference to `calculate_costs(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status