# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
289559 | cheetose | Wall (IOI14_wall) | C++17 | 1514 ms | 83556 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 "wall.h"
#include <bits/stdc++.h>
using namespace std;
int mntree[1<<22], mxtree[1<<22], lazy[1<<22];
void propagation(int node, int S, int E)
{
if (lazy[node] != -1)
{
mntree[node] = mxtree[node] = lazy[node];
if (S != E)
{
lazy[2 * node] = lazy[node];
lazy[2 * node + 1] = lazy[node];
}
lazy[node] = -1;
}
}
void upd(int node, int S, int E, int i, int j, int op, int val)
{
propagation(node, S, E);
if (i > E || j < S) return;
if (j >= E && i <= S)
{
if((op==1 && mntree[node]>=val) || (op==2 && mxtree[node]<=val))return;
if((op==1 && mxtree[node]<=val) || (op==2 && mntree[node]>=val)){
lazy[node]=val;
propagation(node,S,E);
return;
}
}
# | 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... |