# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
844109 | zwezdinv | Chessboard (IZhO18_chessboard) | C++17 | 2041 ms | 12116 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;
#define all(x) x.begin(), x.end()
using ll = long long;
const int N = 2e5;
int cnt0[4 * N], cnt1[4 * N];
bool upd[4 * N];
void push(int node) {
if (!upd[node]) return;
swap(cnt0[node], cnt1[node]);
upd[node << 1] = !upd[node << 1];
upd[node << 1 | 1] = !upd[node << 1 | 1];
upd[node] = 0;
}
int n;
void reset(int node = 1, int l = 0, int r = n - 1) {
upd[node] = 0;
if (l == r) {
cnt0[node] = 1;
cnt1[node] = 0;
return;
}
int m = (l + r) / 2;
reset(node << 1, l, m);
# | 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... |