# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
770853 | josanneo22 | 디지털 회로 (IOI22_circuit) | C++17 | 956 ms | 43720 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 ll long long
const int maxn = 2e5 + 1, MOD = 1e9 + 2022;
class SegmentTree {
private:
struct node {
int rev, sum[2];
node() { rev = 0, sum[0] = sum[1] = 0; }
}tree[maxn << 2];
inline int left(int x) { return x << 1; }
inline int right(int x) { return x << 1 | 1; }
inline void pushup(int pos) {
tree[pos].sum[0] = (tree[left(pos)].sum[0] + tree[right(pos)].sum[0]) % MOD;
tree[pos].sum[1] = (tree[left(pos)].sum[1] + tree[right(pos)].sum[1]) % MOD;
}
inline void reverse(int pos) {
tree[pos].rev ^= 1;
swap(tree[pos].sum[0], tree[pos].sum[1]);
}
inline void pushdown(int pos) {
if (tree[pos].rev) {
reverse(left(pos));
reverse(right(pos));
tree[pos].rev = 0;
}
}
public:
inline void Insert(int u, int s, int k, int l, int r, int pos) {
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |