# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
629924 | cadmiumsky | Digital Circuit (IOI22_circuit) | C++17 | 1157 ms | 40028 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 "circuit.h"
#include <bits/stdc++.h>
using namespace std;
#define int ll
using ll = long long;
using pii = pair<int,int>;
const int nmax = 1e5 + 5, mod = 1e9 + 2022;
int n, m;
int cost[nmax];
namespace AINT {
int aint[nmax * 4], inv[nmax * 4], lazy[nmax * 4];
int init(int node = 1, int cl = 0, int cr = m - 1) {
lazy[node] = 0;
inv[node] = 0;
if(cl == cr) {
aint[node] = cost[cl];
return aint[node];
}
int mid = cl + cr >> 1;
return aint[node] = (init(2 * node, cl, mid) + init(2 * node + 1, mid + 1, cr)) % mod;
}
void push(int node, bool to) {
if(lazy[node])
swap(aint[node], inv[node]);
if(to)
lazy[node * 2] ^= lazy[node],
lazy[node * 2 + 1] ^= lazy[node];
lazy[node] = 0;
return;
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... |
# | 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... |