# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
871804 | 2023-11-11T15:47:07 Z | imarn | Art Collections (BOI22_art) | C++17 | 0 ms | 344 KB |
#include<bits/stdc++.h> #include "art.h" #define f first #define s second #define ll long long #define pb push_back #define pii pair<int,int> #define pll pair<ll,ll> #define sz(x) (int)x.size() #define all(x) x.begin(),x.end() using namespace std; void solve(int N) { vector<int>a(N); int ans[N+1]; for(int i=0;i<N;i++)a[i]=i+1; int tt1=publish(a);int st=tt1; for(int i=1;i<=N-1;i++){ for(int j=i;j<N;j++)a[j]=j-i+1; for(int j=0;j<i;j++)a[j]=N-i+j+1; int tt2=publish(a); ans[N-i+1]=(N-1+tt2-tt1)/2; tt1=tt2; }ans[1]=(N-1+st-tt1)/2; vector<int>ord(N); for(int i=1;i<=N;i++)ord[ans[i]-1]=i; answer(ord); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |