제출 #928795

#제출 시각아이디문제언어결과실행 시간메모리
928795Darren0724콤보 (IOI18_combo)C++17
컴파일 에러
0 ms0 KiB
#include "combo.h" #include "bits/stdc++.h" #include "grader.cpp" using namespace std; string guess_sequence(int n) { string s,t="ABXY"; int k=(press("BY")>0)+(press("XY")>0)*2; rotate(t.begin(),t.begin()+k,t.end()); s.push_back(t[0]); for (int i=0; i<n-2; ++i) { int a=press(s+t[2]+s+t[3]+t[1]+s+t[3]+t[2]+s+t[3]+t[3])-i; a=min(a,3); s.push_back(t[a]); } k=(press(s+"B"+s+"Y")==n)+(press(s+"X"+s+"Y")==n)*2; s.push_back("ABXY"[k]); return s; }

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

/usr/bin/ld: /tmp/ccVhkVmc.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/ccyZeVF9.o:combo.cpp:(.text+0xc0): first defined here
/usr/bin/ld: /tmp/ccVhkVmc.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccyZeVF9.o:combo.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status