# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1062741 | damjandavkov | Wall (IOI14_wall) | C++17 | 932 ms | 91988 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;
vector<int> mx, mn, wl, wr;
int p, dp, r = 2147483647;
void ac(int i, int x, int n)
{
if (x > mn[i])
mx[i] = mn[i] = x;
else if (n < mx[i])
mx[i] = mn[i] = n;
else
{
mx[i] = max(mx[i], x);
mn[i] = min(mn[i], n);
}
}
void push(int i)
{
if (i >= p)
return;
ac(i << 1, mx[i], mn[i]);
ac((i << 1) ^ 1, mx[i], mn[i]);
mx[i] = 0;
mn[i] = r;
}
void upd(int l, int r, int i, int x, int n)
{
push(i);
if (wl[i] >= r || wr[i] <= l)
# | 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... |