제출 #310482

#제출 시각아이디문제언어결과실행 시간메모리
310482juggernautCrayfish scrivener (IOI12_scrivener)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
#include"grader.cpp"
#define fr first
#define sc second
using namespace std;
bool need_compile;
char res[1000005];
vector<pair<bool,int>>op;
void compile(){
    need_compile=0;
    int sz=0;
    for(int i=op.size()-1;i>=0;i--){
        auto to=op[i];
        if(to.fr)i-=to.sc;
        else res[sz++]=to.sc;
    }
    reverse(res,res+sz);
}
void Init(){}
void TypeLetter(char val){
    need_compile=1;
    op.push_back({0,int(val)});
}
void UndoCommands(int num){
    need_compile=1;
    op.push_back({1,num});
}
char GetLetter(int pos){
    if(need_compile)compile();
    return res[pos];
}

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

/tmp/ccYesZ64.o: In function `main':
scrivener.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccIwfVlW.o:grader.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status