# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
485579 | Mazaalai | Wall (IOI14_wall) | C++14 | 730 ms | 142220 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;
const int N = 2e6 + 5;
const int N1 = 2e6 + 5;
const int M = 4 * N;
struct Node {
int mini, maxi, lazy;
Node() {
mini = maxi = 0;
lazy = -1;
}
void setMinMax(int a, int b) {
mini = a, maxi = b;
}
};
vector <int> ans(N1);
vector <int> idx(N1);
vector <Node> node(M);
void propagate(int head) {
if (node[head].lazy == -1) return;
int val = node[head].lazy;
node[head].lazy = -1;
node[head*2+1].setMinMax(val, val);
node[head*2+2].setMinMax(val, val);
node[head*2+1].lazy = val;
node[head*2+2].lazy = val;
}
void update(int l, int r, int L, int R, int val, bool type, int head) {
if ((l > R) ||
# | 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... |