# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1162758 | PagodePaiva | Mechanical Doll (IOI18_doll) | C++17 | 96 ms | 25184 KiB |
#include<bits/stdc++.h>
#include "doll.h"
using namespace std;
const int M = 200010;
vector <int> cnt[M];
int at = -1;
vector <int> c, x, y;
vector <int> order(vector <int> v){
int cnt = 1;
while(cnt < v.size()){
cnt *= 2;
}
if(cnt == 1) return v;
int add = cnt-v.size();
vector <int> vv[2];
while(add > 0){
vv[add%2].push_back(M);
add--;
}
reverse(v.begin(), v.end());
while(vv[0].size() < cnt/2){
vv[0].push_back(v.back());
v.pop_back();
}
while(vv[1].size() < cnt/2){
vv[1].push_back(v.back());
# | 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... |