# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
714442 | 2023-03-24T12:43:20 Z | vjudge1 | Art Collections (BOI22_art) | C++17 | 1 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 inv; bool cmp(int i, int j) { swap(v[i-1], v[j-1]); int inv1 = publish(v); swap(v[i-1], v[j-1]); return inv < inv1; } void solve(int N) { for ( int i = 1; i <= N; i++ ){ v.pb(i); } inv = publish(v); stable_sort(v.begin(),v.end(), cmp); answer(v); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |