# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
986878 | MuntherCarrot | 벽 (IOI14_wall) | C++14 | 449 ms | 41044 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "wall.h"
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 1 << 17;
int t[N << 2];
int add[N << 2], del[N << 2];
void push(int i, int l, int r){
if(l != r){
add[i << 1] = min(add[i << 1], del[i]);
add[i << 1] = max(add[i << 1], add[i]);
del[i << 1] = min(del[i << 1], del[i]);
del[i << 1] = max(del[i << 1], add[i]);
add[i << 1 | 1] = min(add[i << 1 | 1], del[i]);
add[i << 1 | 1] = max(add[i << 1 | 1], add[i]);
del[i << 1 | 1] = min(del[i << 1 | 1], del[i]);
del[i << 1 | 1] = max(del[i << 1 | 1], add[i]);
}
}
void upd(int l, int r, int i, int from, int to, int val, int type){
push(i, from, to);
if(from > r || to < l) return;
if(from >= l && to <= r){
if(type == 1){
add[i] = max(add[i], val);
del[i] = max(del[i], val);
# | 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... |