# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
991335 | gmroh06 | 즐거운 사진 수집 (JOI13_collecting) | C++14 | 808 ms | 78420 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 ll = long long;
inline void fastio() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
}
ll n, q, MAX;
ll row_tree[1 << 21], col_tree[1 << 21];
ll row[21], col[21];
void update(ll* tree, ll* cnt, ll loc) {
loc |= MAX;
tree[loc] ^= 1;
ll d = n;
while (loc > 1) {
loc >>= 1, d--;
if (tree[loc] % (1LL << n - d) == 0) cnt[d]--;
tree[loc] = tree[loc << 1] + tree[loc << 1 | 1];
if (tree[loc] % (1LL << n - d) == 0) cnt[d]++;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |