# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1113466 | jkb_gryz | Bubble Sort 2 (JOI18_bubblesort2) | C++14 | 1578 ms | 4936 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>
#include "bubblesort2.h"
using namespace std;
const int base = 1<<20;
int tree[base<<1];
void update(int v, int x){
v += base;
tree[v] += x;
v /= 2;
while(v){
tree[v] = tree[2*v] + tree[2*v+1];
v /= 2;
}
}
int query(int a, int b){
a += base - 1;
b += base + 1;
int res = 0;
while(a/2 != b/2){
if(a % 2 == 0) res += tree[a+1];
if(b % 2 == 1) res += tree[b-1];
a/=2;
b/=2;
# | 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... |