# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
486955 | KienTran | Feast (NOI19_feast) | C++14 | 190 ms | 145288 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 O = 3e5 + 5;
const int inf = 1e18;
int n, k, a[O], lazy[O * 4];
struct Node{
int sum, l, r, w, pref, suf, lsuf, rpref;
} tree[O * 4], rtree[O * 4];
Node Merg(Node x, Node y){
Node root; root.w = -inf;
root.sum = x.sum + y.sum;
root.pref = x.pref;
root.rpref = x.rpref;
if (x.sum + y.pref > root.pref){
root.pref = x.sum + y.pref;
root.rpref = y.rpref;
}
root.suf = y.suf;
root.lsuf = y.lsuf;
if (y.sum + x.suf > root.suf){
root.suf = y.sum + x.suf;
root.lsuf = x.lsuf;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |