# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
392207 | muhammad_hokimiyon | Bubble Sort 2 (JOI18_bubblesort2) | C++14 | 4412 ms | 314096 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;
const int maxn = 1000500;
int G;
int a[maxn];
set<int> s[4 * maxn];
int f[4 * maxn];
int t[4 * maxn];
int lz[4 * maxn];
void push(int x)
{
lz[x + x] += lz[x];
lz[x + x + 1] += lz[x];
t[x + x] += lz[x];
t[x + x + 1] += lz[x];
lz[x] = 0;
}
void upd(int x, int l, int r, int p, int val)
{
if(l == r){
t[x] -= f[x];
if(val > 0)s[x].insert(val);
else s[x].erase(-val);
if(s[x].empty())f[x] = 0;
# | 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... |