| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1027902 | mareksb | Art Collections (BOI22_art) | C++17 | 923 ms | 1864 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 <bits/stdc++.h>
#include "art.h"
using namespace std;
void solve(int n) {
vector<int> order(n),ans,res(n);
vector<pair<int,int>> tmp;
iota(order.begin(),order.end(),1);
for(int i=0;i<n;i++){
res[i]=publish(order);
rotate(order.begin(),order.begin()+1,order.end());
}
for(int i=0;i<n;i++){
int diff=res[(i+1)%n]-res[i];
tmp.push_back({diff,i+1});
}
sort(tmp.begin(),tmp.end(),greater<pair<int,int>>());
for(auto& p:tmp){
ans.push_back(p.second);
}
answer(ans);
}
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... | ||||
