Submission #1350255

#TimeUsernameProblemLanguageResultExecution timeMemory
1350255dodjingArt 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);
    for (int i = 0; i < n; i++) {
        aaa[i] = i + 1;
    }
    vector <int> res;
    int latest = -1;
    for (int i = 0; i < n; i++) {
        res = publish(aaa);
        for (int j = 0; j < n; j++) {
            if (res[j] == j - i) latest = j;
        }
        swap(aaa[i], aaa[latest]);
    }
    answer(aaa);
}

int main() {
    return 0;
}

Compilation message (stderr)

art.cpp: In function 'void solve(int)':
art.cpp:21:15: error: 'publish' was not declared in this scope
   21 |         res = publish(aaa);
      |               ^~~~~~~
art.cpp:27:5: error: 'answer' was not declared in this scope
   27 |     answer(aaa);
      |     ^~~~~~