제출 #142688

#제출 시각아이디문제언어결과실행 시간메모리
142688triplem5ds콤보 (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include "combo.h" #include "grader.cpp" #include <bits/stdc++.h> using namespace std; char go[] = {'A','B','X','Y'}; std::string guess_sequence(int N) { std::string p = ""; for(int i = 0; i < N; i++){ for(int j = 0; j < 4; j++){ p.push_back(go[j]); int x = press(p); if(x > i){ break; } p.pop_back(); } } return p; }

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

/usr/bin/ld: /tmp/ccLognde.o: in function `press(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
grader.cpp:(.text+0x0): multiple definition of `press(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'; /tmp/cc46ERsd.o:combo.cpp:(.text+0x0): first defined here
/usr/bin/ld: /tmp/ccLognde.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc46ERsd.o:combo.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status