# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
724023 | stage | Measures (CEOI22_measures) | C++14 | 630 ms | 45628 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;
map<pair<int,int>,int> to;
struct node{
int max,min,ans;
};
const int N = 2e5, inf = 1e17;
node segt[4*N+5];
int lazy[4*N+5];
node merge(node a, node b){
node c;
c.ans = max({a.ans,b.ans,a.max-b.min});
c.max = max(a.max,b.max);
c.min = min(a.min,b.min);
return c;
}
void update(int idx, int l, int r, int L, int R, int val){
if (l > R or r < L) return;
if (l >= L and r <= R){
if (L == R) segt[idx] = {val+lazy[idx],val+lazy[idx],0};
else{
segt[idx].max += val;
segt[idx].min += val;
# | 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... |