# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
307290 | tengiz05 | Wall (IOI14_wall) | C++17 | 1108 ms | 49016 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;
struct segtree {
struct Node {
int min;
int max;
};
vector<Node> t;
int no_max = INT_MAX;
int no_min = 0;
int sz;
void init(int n){
sz = 1;
while(sz < n)sz <<= 1;
t.assign(sz*2, {0, 0});
}
void modify(int Max, int Min, int node){
t[node].max = min(Max, max(Min, t[node].max));
t[node].min = min(Max, max(Min, t[node].min));
}
void push(int node, int len){
if(len == 1){
t[node] = {no_min, no_max};
return;
}
modify(t[node].max, t[node].min, node*2);
modify(t[node].max, t[node].min, node*2+1);
t[node] = {no_min, no_max};
}
# | 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... |