# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1028537 | May27_th | Bubble Sort 2 (JOI18_bubblesort2) | C++17 | 1163 ms | 5516 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 i64 long long
#define i128 __int128
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()
i64 a[300005];
struct Tree {
const i64 INF = 1e18;
struct Data {
i64 lf, rg, ans;
};
vector<Data> st;
Tree (int _N) : st(4 * _N + 4) {}
Data combine(Data lf, Data rg) {
Data res;
res.lf = lf.lf;
res.rg = rg.rg;
res.ans = lf.ans + rg.ans + (lf.rg > rg.lf);
return res;
}
void build(int id, int l, int r, vector<int> a) {
if (l == r) {
st[id].lf = st[id].rg = a[l - 1];
st[id].ans = 0;
return;
}
int mid = (l + r)/2;
build(id * 2, l, mid, a);
# | 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... |