# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
255291 | model_code | Progression (NOI20_progression) | C++17 | 1459 ms | 81684 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 <iostream>
#include <algorithm>
using namespace std;
int N, Q;
long long D[300010], B[300010];
struct treedata {
int len; long long val;
treedata() {}
treedata(int _len, long long _val): len(_len), val(_val) {}
static bool cmp(treedata lhs, treedata rhs) {
return lhs.len < rhs.len;
}
};
struct qval {
int len; long long sum;
treedata prefix, suffix, subarray;
qval() {}
qval(long long val) {
len = 1; sum = val;
subarray = treedata(0, 0);
prefix = suffix = treedata(1, val);
}
void add(long long val) {
prefix.val += val;
suffix.val += val;
subarray.val += val;
sum += val * len;
# | 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... |