제출 #1142139

#제출 시각아이디문제언어결과실행 시간메모리
1142139alilou콤보 (IOI18_combo)C++20
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
#include "combo.h"

using namespace std;

string guess_sequence(int n){
    const int m=4;
    string buttons="ABXY";
    string s="";
    for(int i ; i<n ; i++){
        for(int j ; i<m-1 ; i++){
            int lenght=press(s+buttons[j]);
            if (lenght==i+1){
                s+=buttons[j];
                break;
            }
        if (s.size()!=i+1)s+=buttons[m-1];
        }
    s+=buttons[m-1];
    }
    return s;


}


int main(){
    int n;
    cin>>n;
    guess_sequence(n);
    return 0;
}

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

/usr/bin/ld: /tmp/ccE0ssdS.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccM0B6An.o:combo.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status