| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1363403 | ramzialoulou | Art Collections (BOI22_art) | C++20 | 242 ms | 444 KiB |
#include "art.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> p;
void sort(int l, int r) {
if (l == r) {
return;
}
int m = (l + r) / 2;
sort(l, m);
sort(m + 1, r);
vector<int> t;
int i = l, j = m + 1;
int inti = publish(p);
while (i <= m && j <= r) {
swap(p[i], p[j]);
int after = publish(p);
swap(p[i], p[j]);
t.push_back((inti < after ? p[i++] : p[j++]));
}
while (i <= m) {
t.push_back(p[i++]);
}
while (j <= r) {
t.push_back(p[j++]);
}
for (int i = l; i <= r; i++) {
p[i] = t[i - l];
}
}
void solve(int N) {
p.resize(N);
iota(p.begin(), p.end(), 1);
sort(0, N - 1);
answer(p);
}
| # | 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... | ||||
