Submission #1361479

#TimeUsernameProblemLanguageResultExecution timeMemory
1361479kawhietArt Collections (BOI22_art)C++20
0 / 100
0 ms344 KiB
#include <bits/stdc++.h>
#include "art.h"
using namespace std;

void solve(int n) {
    vector<int> a(n);
    iota(a.begin(), a.end(), 1);
    int x = publish(a);
    vector<int> ans(n, 1);
    for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
            swap(a[i], a[j]);
            int y = publish(a);
            swap(a[i], a[j]);
            if (y == x - 1) {
                ans[i]++;
            } else {
                ans[j]++;
            }
        }
    }
    answer(ans);
}
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...