# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
846077 | Piokemon | Cheerleaders (info1cup20_cheerleaders) | C++17 | 573 ms | 16376 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>
using namespace std;
typedef long long int ll;
constexpr int K = 17;
constexpr int N = (1<<K);
int a[N+9];
int b[N+9];
vector<vector<int>> seg[K+5];
ll zwy,rev;
void dziel(vector<int> &poz, int k){
vector<int> one,zero; one.clear();zero.clear();
for (int x:poz){
if (a[x]&(1<<k)){
one.push_back(x);
rev += zero.size();
}
else{
zero.push_back(x);
zwy += one.size();
}
}
if (k>0){
if (one.size()>1)seg[k-1].push_back(one);
if (zero.size()>1)seg[k-1].push_back(zero);
}
}
# | 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... |