# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
122609 | brcode | Wall (IOI14_wall) | C++14 | 228 ms | 9976 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 <iostream>
#include "wall.h"
using namespace std;
struct node{
int mn,mx;
};
const int MAXN = 4e6+5;
pair<int,int> lazy[4*MAXN];
int ans[MAXN];
int seg[4*MAXN];
void push(int curr,int l,int r){
if(lazy[curr].first == -1e9 && lazy[curr].second == -1e9){
return;
}
seg[curr] = max(seg[curr],lazy[curr].first);
seg[curr] = min(seg[curr],lazy[curr].second);
if(l!=r){
auto a = lazy[2*curr];
auto b = lazy[curr];
if(b.second<=a.first){
a = make_pair(b.second,b.second);
}else if(b.first>=a.second){
a = make_pair(b.first,b.first);
}else{
a.first = max(a.first,b.first);
a.second = max(a.second,b.second);
}
lazy[2*curr] = a;
a= lazy[2*curr+1];
b = lazy[curr];
# | 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... |