제출 #1145581

#제출 시각아이디문제언어결과실행 시간메모리
1145581guagua0407콤보 (IOI18_combo)C++20
컴파일 에러
0 ms0 KiB
#include "combo.h"
#include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair<int,int>
#define f first
#define s second
#define all(x) x.begin(),x.end()
#define _ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

std::string guess_sequence(int n) {
    string str;
    for(int i=1;i<=n;i++){
        for(auto c:{'X','Y','A','B'}){
            if(press(str+c)==i){
                str+=c;
                break;
            }
        }
    }
    return str;
}

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

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