# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
445504 | cpp219 | Bubble Sort 2 (JOI18_bubblesort2) | C++14 | 2910 ms | 129652 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.
#pragma GCC optimization O2
#pragma GCC optimization "unroll-loop"
#pragma target ("avx2")
#include <bits/stdc++.h>
#define ll int
#define ld long double
#define fs first
#define sc second
using namespace std;
typedef pair<ll,ll> LL;
const ll N = 1e6 + 9;
const ll Log2 = 20;
const ll inf = 1e9 + 7;
set<ll> s[N];
ll n,Q,st[4*N],a[N],cnt[N],sz = N - 1,lazy[4*N];
void Pass(ll id){
ll t = lazy[id]; lazy[id] = 0;
st[id*2] += t; lazy[id*2] += t;
st[id*2 + 1] += t; lazy[id*2 + 1] += t;
}
void upd(ll id,ll l,ll r,ll u,ll v,ll val){
if (v < l||r < u) return;
if (u <= l&&r <= v){
if (u == v) st[id] = val;
else st[id] += val,lazy[id] += val;
return;
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... |