# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
578211 | tengiz05 | Spring cleaning (CEOI20_cleaning) | C++17 | 274 ms | 21636 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 <bits/stdc++.h>
using namespace std;
using i64 = long long;
struct SegmentTree {
int n;
vector<int> t, lz;
SegmentTree(int n) : n(n), t(4 * n), lz(4 * n) {}
void push(int p, int len) {
if (!lz[p])
return;
if (len > 1) {
lz[2 * p] ^= lz[p];
lz[2 * p + 1] ^= lz[p];
}
t[p] = len - t[p];
lz[p] = 0;
}
void update(int p, int l, int r, int x, int y) {
push(p, r - l);
if (r <= x || y <= l)
return;
if (x <= l && r <= y) {
lz[p] = 1;
push(p, r - l);
return;
}
int m = (l + r) / 2;
update(2 * p, l, m, x, y);
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |