# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
946719 | MinaRagy06 | Measures (CEOI22_measures) | C++17 | 486 ms | 23748 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>
using namespace std;
#define ll long long
#define md ((l + r) >> 1)
#define SZ(x) (int) x.size()
struct node {
ll pos, neg, lazy;
int cnt;
node(ll x) {
pos = x;
neg = -x;
cnt = 1;
lazy = 0;
}
node() {pos = neg = -1e18; cnt = lazy = 0;}
friend node operator+(const node &l, const node &r) {
node ret;
ret.pos = max(l.pos, r.pos);
ret.neg = max(l.neg, r.neg);
ret.cnt = l.cnt + r.cnt;
return ret;
}
} seg[1 << 19];
void process(int i, int l, int r) {
if (l != r) {
for (auto c : {i << 1, i << 1 | 1}) {
seg[c].lazy += seg[i].lazy;
}
}
# | 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... |