# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
714448 | 2023-03-24T12:56:30 Z | vjudge1 | Art Collections (BOI22_art) | C++17 | 0 ms | 208 KB |
#include "art.h" #include "bits/stdc++.h" #define intt long long #define pb push_back #define endl '\n' #define F first #define S second #define pii pair<int,int> #define pll pair<intt,intt> #define ld long double #define fast_io ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); using namespace std; const int sz = 2e5+5; vector<int>v; int n; int inv; bool cmp(int i, int j) { swap(v[n-i], v[n-j]); int inv1 = publish(v); swap(v[n-i], v[n-j]); return inv < inv1; } void solve(int N) { for ( int i = 1; i <= N; i++ ){ v.pb(i); } n = N; reverse(v.begin(), v.end()); inv = publish(v); vector<int>res = v; stable_sort(res.begin(),res.end(), cmp); answer(res); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 208 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 208 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 208 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 208 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 208 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 208 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |