# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
852550 | LucaDantas | Swap Swap Sort (CCO21_day1problem1) | C++17 | 5020 ms | 9552 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;
#define int long long
constexpr int B = 1e5, maxn = 1e5+10;
vector<int> pos[maxn];
int a[maxn], id[maxn], cnt;
long long resp[maxn/B+10][maxn];
struct BIT {
int bit[maxn];
void upd(int x) {
for(; x > 0; x-=x&-x)
++bit[x];
}
int query(int x) {
int ans = 0;
for(; x < maxn; x+=x&-x)
ans += bit[x];
return ans;
}
} bit;
long long inversoes(int n) {
long long ans = 0;
for(int i = 1; i <= n; i++) {
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... |