| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 732021 | TB_ | Art Collections (BOI22_art) | C++17 | 1576 ms | 692 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;
// #pragma GCC optimize("Ofast,inline")
// #pragma GCC optimize("unroll-loops")
#define ll long long
#define INF (ll)1e9+7
#define fo(i,n) for(ll i = 0;i<n;i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define deb(x) cout << #x << " = " << x << endl;
#define pb push_back
#define F first
#define S second
#define LSOne(x) ((x) & (-x))
typedef vector<int> vi;
typedef vector<ll> vl;
// int publish(vi v){
// fo(i, v.size())cout << v[i] << " ";
// cout << endl;
// int r;
// cin >> r;
// return r;
// }
void solve(int n){
vi v(n);
fo(i, n){
v[i] = i+1;
}
vi res;
fo(i, n){
res.pb(publish(v));
// deb((publish(v)-);
reverse(all(v));
int val = v[n-1];
v.pop_back();
reverse(all(v));
v.pb(val);
}
vector<pair<ll, ll>> ans;
int last = res[n-1];
fo(i, n){
// deb((last-res[i]));
ans.pb({last-res[i], (i?i:n)});
last = res[i];
}
sort(all(ans));
vi toSend;
fo(i, n){
toSend.pb(ans[i].S);
// deb(ans[i].F);
// deb(ans[i].S);
}
// deb(ans[0].S);
// toSend.pb(ans[0].S);
answer(toSend);
}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... | ||||
