# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
872588 | dsyz | Wall (IOI14_wall) | C++17 | 615 ms | 262144 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>
#include "wall.h"
using namespace std;
using ll = long long;
#define MAXN (1000005)
struct node {
node *l, *r;
ll s,e,m,opmax,opmin;
node(ll _s,ll _e){
s=_s,e=_e,m=(s+e)/2;
opmax = opmin = 0;
if(s!=e)l=new node(s,m),r=new node(m+1,e);
}
void minimise(ll x,ll y,ll nval){
value();
if(s==x&&e==y) {
if(opmax > nval) {
opmax = nval;
if(opmin > nval)opmin=nval;
}
return;
}
if(x>m)r->minimise(x,y,nval);
else if(y<=m)l->minimise(x,y,nval);
else l->minimise(x,m,nval),r->minimise(m+1,y,nval);
opmax = max(l->opmax, r->opmax);
opmin = min(l->opmin, r->opmin);
}
void maximise(ll x,ll y,ll nval){
# | 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... |