# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
590053 | Tien_Noob | Triple Jump (JOI19_jumps) | C++17 | 854 ms | 59760 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.
//Make CSP great again
//Vengeance
#include <bits/stdc++.h>
#define TASK "TESTCODE"
#define Log2(x) 31 - __builtin_clz(x)
using namespace std;
const int N = 5e5;
int a[N + 1], res[N + 1], n, q;
vector<pair<int, int> > query[N + 1];
struct SegmentTree
{
int add[4 * N + 1], mx[4 * N + 1], lazy[4 * N + 1];
void buildtree(int v, int TreeL, int TreeR)
{
add[v] = lazy[v] = 0;
if (TreeL == TreeR)
{
mx[v] = a[TreeL];
return ;
}
int mid = (TreeL + TreeR)/2;
buildtree(v * 2, TreeL, mid);
buildtree(v * 2 + 1, mid + 1, TreeR);
mx[v] = max(mx[2 * v], mx[2 * v + 1]);
}
void down(int v)
{
add[2 * v] = max(add[2 * v], lazy[v] + mx[2 * v]);
add[2 * v + 1] = max(add[2 * v + 1], lazy[v] + mx[2 * v + 1]);
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... |