# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
862356 | TAhmed33 | Osumnjičeni (COCI21_osumnjiceni) | C++98 | 394 ms | 32276 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define mid ((l + r) >> 1)
#define tl (node + 1)
#define tr (node + 2 * (mid - l + 1))
bool intersect (pair <int, int> a, pair <int, int> b) {
return !(a.second < b.first || b.second < a.first);
}
const int MAXN = 2e5 + 25;
struct SegmentTree {
int tree[4 * MAXN], lazy[4 * MAXN];
void init () {
for (int i = 1; i < 4 * MAXN; i++) lazy[i] = -1;
}
void prop (int l, int r, int node) {
if (lazy[node] == -1) return;
if (l != r) {
lazy[tl] = lazy[tr] = lazy[node];
}
tree[node] = lazy[node];
lazy[node] = -1;
}
void update (int l, int r, int a, int b, int c, int node) {
prop(l, r, node);
if (l > b || r < a) return;
if (l >= a && r <= b) {
lazy[node] = c;
prop(l, r, node);
return;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |