# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1109763 | VinhLuu | Bubble Sort 2 (JOI18_bubblesort2) | C++17 | 1631 ms | 87280 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>
#define ll long long
#include "bubblesort2.h"
using namespace std;
const int N = 1e6 + 5;
const int oo = -1e9;
int n, m, q, a[N], _x[N], _y[N], kq[N], pos[N];
int st[N << 2], lz[N << 2], le[N], ri[N];
void build(int i,int l,int r){
if(l == r){
st[i] = oo;
return;
}
int mid = (l + r) / 2;
build(i << 1, l, mid);
build(i << 1|1, mid + 1, r);
st[i] = max(st[i << 1], st[i << 1|1]);
}
void dolz(int i){
if(!lz[i]) return;
int x = lz[i]; lz[i] = 0;
lz[i << 1] += x;
lz[i << 1|1] += x;
st[i << 1] += x;
st[i << 1|1] += x;
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... |