# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
962054 | marinaluca | Art Collections (BOI22_art) | C++17 | 1171 ms | 1748 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"
//#pragma GCC optimize ("O4")
//#pragma GCC optimize ("fast-math")
//#pragma GCC optimize ("unroll-loops")
using namespace std;
//using vii = vector <int>;
using maaa = map <int, int>;
//#define int long long
#define ll long long
#define XX first
#define YY second
#define all (x) begin(x), end(x)
//#define pb push_back
//#define mp make_pair
//#define pf push_front
//#define pp pop_front
//#define pub pop_back
/**#define cin fin
#define cout fout
ifstream cin ("pfn.in");
ofstream cout ("pfn.out");
**/
typedef double dbl;
typedef long double ldb;
typedef pair <int, int> pii;
typedef vector <int> vii;
typedef pair <double, int> pdi;
typedef float fl;
const int SMAX = 10;
const int VMAX = 1;
const int RMAX = 179;
const int NMAX = 4e3;
void solve (int N){
int n = N;
vector <int> ans(n), v;
for (int i = 1; i <= n; ++ i){
v.push_back(i);
}
int rasp = publish(v), pr;
for (int i = 1; i < n; ++ i){
int val = v[0];
v.erase(v.begin());
v.push_back(val);
pr = publish(v);
ans[(n - 1 - pr + rasp) / 2] = i;
rasp = pr;
}
for (int i = 0; i < n; ++ i){
if (ans[i] == 0)
ans[i] = n;
}
answer (ans);
}
/**signed main(void){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
solve();
return 0 ^ 0;
}**/
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... |