제출 #586124

#제출 시각아이디문제언어결과실행 시간메모리
586124tamthegodUnscrambling a Messy Bug (IOI16_messy)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
#include<messy.h>

#define int long long
#define pb push_back
#define fi first
#define se second
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int maxN = 1e6 + 5;
const int mod = 1e9 + 7;
const ll oo = 1e18;
int p[maxN];
void ReadInput()
{

}
vector<int> restore_permutation(int n, int w, int r)
{
    string s;
    for(int i=1; i<=n; i++) s += '0';
    for(int i=1; i<=n; i++)
    {
        s[i - 1] = '1';
        add_element(s);
    }
    vector<int> p(n, -1);
    for(int i=1; i<=n; i++)
        for(int j=1; j<=n; j++)
        {
            if(p[j - 1] != -1) continue;
            s[j - 1] = '1';
            if(check_element(s))
            {
                p[j - 1] = i - 1;
                break;
            }
            else s[j - 1] = '0';
        }
    return p;
}
void Solve()
{

}
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    ReadInput();
    Solve();
}

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

/usr/bin/ld: /tmp/ccWZDf67.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc4vkfo8.o:messy.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccWZDf67.o: in function `main':
grader.cpp:(.text.startup+0x1b4): undefined reference to `restore_permutation(int, int, int)'
collect2: error: ld returned 1 exit status