# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
987520 | ThegeekKnight16 | 벽 (IOI14_wall) | C++17 | 1176 ms | 130760 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "wall.h"
using namespace std;
const int MAXN = 2e6 + 10;
struct node
{
int maxVal, minVal, lz;
node(int MX = 0, int MN = 0, int LZ = -1) : maxVal(MX), minVal(MN), lz(LZ) {}
node operator+ (node outro)
{
return node(max(maxVal, outro.maxVal), min(minVal, outro.minVal));
}
};
array<node, 4*MAXN> seg;
void refresh(int pos, int ini, int fim)
{
if (seg[pos].lz == -1) return;
int x = seg[pos].lz; seg[pos].lz = -1;
seg[pos].maxVal = seg[pos].minVal = x;
if (ini == fim) return;
int e = 2*pos, d = e+1;
seg[e].lz = seg[d].lz = x;
}
void updateAdd(int pos, int ini, int fim, int p, int q, int 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... |