# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
122609 | brcode | 벽 (IOI14_wall) | C++14 | 228 ms | 9976 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |