# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
860582 | E869120 | Art Collections (BOI22_art) | C++17 | 1 ms | 344 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.
#include "art.h"
#include <iostream>
using namespace std;
int Return[100009];
void solve(int N) {
// Step 1
for (int i = 1; i <= N; i++) {
vector<int> Order;
Order.push_back(i);
for (int j = 1; j <= N; j++) {
if (j != i) Order.push_back(j);
}
Return[i] = publish(Order);
}
// Step 2
vector<int> Answer = {1};
for (int i = 2; i <= N; i++) {
int diff = Return[i] - Return[1];
int val = (diff + (i - 1)) / 2 + 1;
Answer.push_back(val);
for (int j = 0; j < i - 1; j++) {
if (Answer[j] >= val) Answer[j] += 1;
}
}
answer(Answer);
}
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... |