제출 #308445

#제출 시각아이디문제언어결과실행 시간메모리
308445juggernautUnscrambling a Messy Bug (IOI16_messy)C++14
컴파일 에러
0 ms0 KiB
#include"messy.h"
#include<bits/stdc++.h>
#include"grader.cpp"
using namespace std;
int id[1<<7],i,cnt;
vector<int>restore_permutation(int n,int w,int r){
    iota(id,id+n,0);
    vector<int>ans(n);
    string s(n,'0');
    for(i=0;i<n;i++){
        s[id[i]]++;
        add_element(s);
    }
    fill(s.begin(),s.end(),'0');
    compile_set();
    while(n-cnt)
        for(i=0;i<n;i++)
            if(s[id[i]]=='0'){
                s[id[i]]='1';
                if(check_element(s)){
                    ans[id[i]]=cnt++;
                    break;
                }else s[id[i]]='0';
            }
    return ans;
}

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

/tmp/cccUvdfR.o: In function `helper::read_int()':
grader.cpp:(.text+0x0): multiple definition of `helper::read_int()'
/tmp/ccZzGgHS.o:messy.cpp:(.text+0x0): first defined here
/tmp/cccUvdfR.o: In function `get_p(int)':
grader.cpp:(.text+0x50): multiple definition of `get_p(int)'
/tmp/ccZzGgHS.o:messy.cpp:(.text+0x50): first defined here
/tmp/cccUvdfR.o:(.bss+0x10): multiple definition of `helper::p'
/tmp/ccZzGgHS.o:(.bss+0x230): first defined here
/tmp/cccUvdfR.o: In function `wa()':
grader.cpp:(.text+0x70): multiple definition of `wa()'
/tmp/ccZzGgHS.o:messy.cpp:(.text+0x70): first defined here
/tmp/cccUvdfR.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccZzGgHS.o:messy.cpp:(.text.startup+0x0): first defined here
/tmp/cccUvdfR.o:(.bss+0x28): multiple definition of `helper::n'
/tmp/ccZzGgHS.o:(.bss+0x248): first defined here
/tmp/cccUvdfR.o:(.bss+0x4): multiple definition of `helper::w'
/tmp/ccZzGgHS.o:(.bss+0x224): first defined here
/tmp/cccUvdfR.o:(.bss+0x0): multiple definition of `helper::r'
/tmp/ccZzGgHS.o:(.bss+0x220): first defined here
/tmp/cccUvdfR.o:(.bss+0x2c): multiple definition of `helper::compiled'
/tmp/ccZzGgHS.o:(.bss+0x24c): first defined here
/tmp/cccUvdfR.o: In function `check(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
grader.cpp:(.text+0xa0): multiple definition of `check(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/tmp/ccZzGgHS.o:messy.cpp:(.text+0xa0): first defined here
/tmp/cccUvdfR.o: In function `check_element(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
grader.cpp:(.text+0xf0): multiple definition of `check_element(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccZzGgHS.o:messy.cpp:(.text+0xf0): first defined here
/tmp/cccUvdfR.o:(.bss+0x40): multiple definition of `helper::set_[abi:cxx11]'
/tmp/ccZzGgHS.o:(.bss+0x260): first defined here
/tmp/cccUvdfR.o: In function `add_element(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
grader.cpp:(.text+0x250): multiple definition of `add_element(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccZzGgHS.o:messy.cpp:(.text+0x250): first defined here
/tmp/cccUvdfR.o: In function `compile_set()':
grader.cpp:(.text+0x2b0): multiple definition of `compile_set()'
/tmp/ccZzGgHS.o:messy.cpp:(.text+0x2b0): first defined here
collect2: error: ld returned 1 exit status