| # | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1028179 | BABY_GANGSTER | Bubble Sort 2 (JOI18_bubblesort2) | C++14 | 968 ms | 46768 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 optimize("Ofast,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
constexpr int64_t N = 500000, L = 1ULL << 20;
int32_t T[2 * L][3];
void propagate(size_t k)
{
T[2 * k][0] += T[k][1];
T[2 * k][1] += T[k][1];
T[2 * k + 1][0] += T[k][1];
T[2 * k + 1][1] += T[k][1];
T[k][1] = 0;
}
void increment(size_t i, size_t j, int64_t x, size_t k = 1, size_t a = 0, size_t b = L)
{
if (b <= i || a >= j)
return;
if (i <= a && b <= j)
T[k][0] += x, T[k][1] += x;
else
{
propagate(k);
increment(i, j, x, 2 * k, a, (a + b) / 2);
increment(i, j, x, 2 * k + 1, (a + b) / 2, b);
T[k][0] = max(T[2 * k][0], T[2 * k + 1][0]);
T[k][2] = T[2 * k][2] + T[2 * k + 1][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... | ||||
