# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1093458 | andrewp | Art Collections (BOI22_art) | C++17 | 1107 ms | 1844 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//Dedicated to my love, ivaziva
#pragma GCC optimize("Ofast")
#include "art.h"
#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using ll = int64_t;
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define dbg(x) cerr << #x << ": " << x << '\n';
const int N = 4010;
void solve(int n) {
vector<int> a;
for (int i = 1; i <= n; i++) {
vector<int> perm;
for (int j = i; j <= n; j++) {
perm.push_back(j);
}
for (int j = 1; j <= i - 1; j++) {
perm.push_back(j);
}
a.push_back(publish(perm));
}
vector<pii> srt;
for (int i = 1; i < n; i++) {
srt.push_back({a[i - 1] - a[i], i});
}
srt.push_back({a[n - 1] - a[0], n});
sort(all(srt));
vector<int> ans;
for (auto x : srt) {
ans.push_back(x.second);
}
answer(ans);
}
// int32_t main() {
// ios::sync_with_stdio(false); cin.tie(nullptr);
// cout.tie(nullptr); cerr.tie(nullptr);
// return 0;
// }
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |