# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
623362 | M_W | Wall (IOI14_wall) | C++17 | 844 ms | 132132 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"
#define ii pair<int, int>
using namespace std;
int t[2000002 << 2][2], lazy[2000002 << 2][2]; // lower, upper
void push(int v){
// Do something
if(lazy[v][0] == 0 && lazy[v][1] == INT_MAX) return;
t[v * 2][0] = max(t[v * 2][0], lazy[v][0]);
t[v * 2 + 1][0] = max(t[v * 2 + 1][0], lazy[v][0]);
t[v * 2][1] = max(t[v * 2][1], lazy[v][0]);
t[v * 2 + 1][1] = max(t[v * 2 + 1][1], lazy[v][0]);
lazy[v * 2][0] = max(lazy[v * 2][0], lazy[v][0]);
lazy[v * 2 + 1][0] = max(lazy[v * 2 + 1][0], lazy[v][0]);
lazy[v * 2][1] = max(lazy[v * 2][1], lazy[v][0]);
lazy[v * 2 + 1][1] = max(lazy[v * 2 + 1][1], lazy[v][0]);
t[v * 2][0] = min(t[v * 2][0], lazy[v][1]);
t[v * 2 + 1][0] = min(t[v * 2 + 1][0], lazy[v][1]);
t[v * 2][1] = min(t[v * 2][1], lazy[v][1]);
t[v * 2 + 1][1] = min(t[v * 2 + 1][1], lazy[v][1]);
lazy[v * 2][0] = min(lazy[v * 2][0], lazy[v][1]);
lazy[v * 2 + 1][0] = min(lazy[v * 2 + 1][0], lazy[v][1]);
lazy[v * 2][1] = min(lazy[v * 2][1], lazy[v][1]);
lazy[v * 2 + 1][1] = min(lazy[v * 2 + 1][1], lazy[v][1]);
# | 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... |