# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
712652 | Mher777 | Art Collections (BOI22_art) | C++17 | 1666 ms | 624 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.
//////////////////////////////// Mher777
/* -------------------- Includes -------------------- */
#include <iostream>
#include <iomanip>
#include <array>
#include <string>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <list>
#include <iterator>
#include <numeric>
#include <complex>
#include <utility>
#include <random>
#include <fstream>
#include "art.h"
using namespace std;
typedef int itn;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef float fl;
typedef double db;
using vi = vector<int>;
using vll = vector<ll>;
using mii = map<int, int>;
using mll = map<ll, ll>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define ff first
#define ss second
#define pub push_back
#define pob pop_back
#define puf push_front
#define pof pop_front
#define mpr make_pair
#define yes cout<<"YES\n"
#define no cout<<"NO\n"
#define all(x) (x).begin(), (x).end()
const int MAX = int(1e9 + 5);
const ll MAXL = ll(1e18 + 5);
const ll MOD = ll(1e9 + 7);
const ll MOD2 = ll(998244353);
void solve(int n) {
vector <int> v;
vector <int> ans(n);
for (int i = 1; i <= n; i++) v.pub(i);
int cnt_prev = publish(v);
for (int i = 1; i < n; i++) {
int x = v[0];
v.erase(v.begin());
v.pub(x);
int cnt_cur = publish(v);
ans[(cnt_prev - cnt_cur + n - 1) / 2] = i;
cnt_prev = cnt_cur;
}
for (int i = 0; i < n; i++) {
if (ans[i] == 0) ans[i] = n;
}
answer(ans);
}
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... |