# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
979782 | someone | Fish 3 (JOI24_fish3) | C++14 | 805 ms | 73272 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 M = 1 << 19, N = 2 * M, INF = 1e15 + 42;
struct Query {
int l, r, val = 0;
};
int sum[N], tag[N];
void applyOp(int i, int len, int add) {
sum[i] += len * add;
tag[i] += add;
}
void propage(int i, int len) {
applyOp(i*2, len, tag[i]);
applyOp(i*2+1, len, tag[i]);
tag[i] = 0;
}
int update(int i, int deb, int fin, int l, int r, int add) {
if(fin <= l || r <= deb) return 0;
if(l <= deb && fin <= r) {
applyOp(i, fin - deb, add);
return sum[i];
}
int mid = (deb + fin) >> 1;
# | 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... |