# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
671765 | Hacv16 | Dancing Elephants (IOI11_elephants) | C++17 | 0 ms | 0 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 "elephants.h"
#include<bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
using namespace std;
typedef long long ll;
const int MAX = 2e6 + 15;
int n, l, pos[MAX];
vector<int> x;
void init(int n_, int l_, int x_[]){
n = n_, l = l_;
x.resize(n);
for(int i = 0; i < n; i++)
x[i] = x_[i], pos[i] = x[i];
}
vector<int> Merge(vector<int>& x, vector<int>& y, vector<int>& z){
vector<int> aux(sz(x) + sz(y)), ret(sz(x) + sz(y) + sz(z));
merge(all(x), all(y), aux.begin());
merge(all(aux), all(z), ret.begin());
return ret;
}