제출 #1001797

#제출 시각아이디문제언어결과실행 시간메모리
1001797ayankarimovaDetecting Molecules (IOI16_molecules)C++14
컴파일 에러
0 ms0 KiB
#include <cstdio> #include <vector> #include <cassert> #include "molecules.h" int main() { int n, l, u; assert(3 == scanf("%d %d %d", &n, &l, &u)); std::vector<int> w(n); for (int i = 0; i < n; i++) assert(1 == scanf("%d", &w[i])); std::vector<int> result = find_subset(l, u, w); printf("%d\n", (int)result.size()); for (int i = 0; i < (int)result.size(); i++) printf("%d%c", result[i], " \n"[i == (int)result.size() - 1]); }

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

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