# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
441511 | peijar | Triple Jump (JOI19_jumps) | C++17 | 1756 ms | 125080 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>
#define int long long
using namespace std;
const int MAXN = (1 << 20) + 1;
const int INF = -1e18;
int iDeb[MAXN], iFin[MAXN], lazyMax[MAXN], maxVal[MAXN], strengh[MAXN],
maxStrength[MAXN];
void buildTree(int iNoeud, int deb, int fin) {
iDeb[iNoeud] = deb, iFin[iNoeud] = fin;
lazyMax[iNoeud] = INF;
if (deb == fin) {
maxStrength[iNoeud] = strengh[deb];
maxVal[iNoeud] = INF;
return;
}
buildTree(2 * iNoeud, deb, (deb + fin) / 2);
buildTree(2 * iNoeud + 1, (deb + fin) / 2 + 1, fin);
maxVal[iNoeud] = INF;
maxStrength[iNoeud] =
max(maxStrength[2 * iNoeud], maxStrength[2 * iNoeud + 1]);
}
void push(int iNoeud) {
if (lazyMax[iNoeud] == INF)
return;
maxVal[iNoeud] = max(maxVal[iNoeud], maxStrength[iNoeud] + lazyMax[iNoeud]);
# | 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... |