Submission #1350263

#TimeUsernameProblemLanguageResultExecution timeMemory
1350263dodjingArt Collections (BOI22_art)C++20
Compilation error
0 ms0 KiB
#include <iostream>
#include <vector>
#include <numeric>
#include <unordered_map>
#include <cstdint>
#include <chrono>
#include "art.h"

#define ll long long

using namespace std;

void solve(int n) {
    vector <int> aaa(n);
    vector <int> ans(n);
    for (int i = 0; i < n; i++) {
        aaa[i] = i + 1;
    }
    int res_b, res_n, res_f;
    res_n = publish(aaa);
    res_f = res_n;
    for (int i = 0; i < n - 1; i++) {
        int temp = aaa[0];
        for (int j = 0; j < n - 1; j++) {
            aaa[j] = aaa[j + 1];
        }
        aaa[n - 1] = temp;
        res_b = res_n;
        res_n = publish(aaa);
        int dif = res_n - res_b;
        dif -= (n + 1);
        dif /= -2;
        ans[dif - 1] = aaa[n - 1];
    }
    int dif = res_f - res_n;
    dif -= (n + 1);
    dif /= -2;
    ans[dif - 1] = aaa[1];
    answer(ans);
}

int main() {
    return 0;
}

Compilation message (stderr)

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