# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
131318 | aura02 | 조개 줍기 (KOI17_shell) | C++14 | 1077 ms | 100368 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;
long long N, arr[1600][1600], DP[1600][1600], S;
class SegmentTree {
private:
long long MAX, tree[7000], lazy[7000];
public:
void propagation(int now, int s, int e) {
if (!lazy[now])
return;
tree[now] += (e - s + 1)*lazy[now];
if (e != s) {
lazy[now * 2] += lazy[now];
lazy[now * 2 + 1] += lazy[now];
}
lazy[now] = 0;
}
void update(int now, int s, int e, int l, int r, long long v) {
propagation(now, s, e);
if (r < s || e < l)
return;
if (l <= s && e <= r) {
tree[now] += (e - s + 1)*v;
if (s != e) {
lazy[now * 2] += v;
lazy[now * 2 + 1] += v;
}
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... |