| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1361810 | kawhiet | Art Collections (BOI22_art) | C++20 | 492 ms | 500 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);
vector<int> b(n);
for (int i = 0; i < n; i++) {
b[i] = publish(a);
a.push_back(a.front());
a.erase(a.begin());
}
int sum = n * (n - 1) / 2;
vector<int> ans(n);
for (int i = 1; i < n; i++) {
int j = n - (b[i] - b[i - 1] + n + 1) / 2;
ans[j] = i;
sum -= j;
}
ans[sum] = n;
answer(ans);
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
