# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
971276 | groshi | Art Collections (BOI22_art) | C++17 | 1660 ms | 2116 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;
#define int long long
int wynik[5000];
vector<int32_t> zmien(list<int32_t> QQ)
{
vector<int32_t> QQQ;
while(QQ.size())
QQQ.push_back(QQ.front()),QQ.pop_front();
return QQQ;
}
map<int,int> prep;
void solve(int32_t n)
{
for(int i=1;i<=n;i++)
prep[-(n-i)+i-1]=i;
list<int32_t> Q;
for(int i=1;i<=n;i++)
Q.push_back(i);
int ile=publish(zmien(Q));
for(int i=2;i<=n;i++)
{
Q.push_front(Q.back());
Q.pop_back();
int nowe=publish(zmien(Q));
int delta=nowe-ile;
wynik[prep[delta]]=Q.front();
ile=nowe;
}
for(int i=1;i<=n;i++)
if(wynik[i]==0)
wynik[i]=1;
vector<int32_t> wypisz;
for(int i=1;i<=n;i++)
wypisz.push_back(wynik[i]);
answer(wypisz);
}
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... |