# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
539273 | NaimSS | Bubble Sort 2 (JOI18_bubblesort2) | C++14 | 2341 ms | 51560 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 "bubblesort2.h"
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> pii;
#define ff first
#define ss second
const int MAXN = 1e6 + 100;
int tree[4*MAXN];
int lazy[4*MAXN];
int n;
const int inf = 1e9;
void propagate(int no,int i,int j){
if(lazy[no]==0)return;
tree[no]+=lazy[no];
if(i!=j){
lazy[2*no]+=lazy[no];
lazy[2*no+1]+=lazy[no];
}
lazy[no] = 0;
}
void update(int no,int i,int j,int a,int b,int v){
if(a > b)return;
propagate(no,i,j);
if(i>b || j<a || i>j)return;
if(a<=i && j<=b){
tree[no] += v;
if(i!=j){
# | 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... |