제출 #684318

#제출 시각아이디문제언어결과실행 시간메모리
684318Konti2Combo (IOI18_combo)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; int press(string p){ } string guess_sequence(int N){ string ans = ""; vector<char> opcje = {'A','B','X','Y'}; for (int i = 1; i <= N; i++){ for (int j = 0; j < 4; j++){ if (press(ans + opcje[j]) == i){ ans += opcje[j]; break; } } } return ans; }

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

combo.cpp: In function 'int press(std::string)':
combo.cpp:7:1: warning: no return statement in function returning non-void [-Wreturn-type]
    7 | }
      | ^
/usr/bin/ld: /tmp/ccGuBfdC.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/ccO4xOSE.o:combo.cpp:(.text.unlikely+0x0): first defined here
collect2: error: ld returned 1 exit status