# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
628559 | 600Mihnea | 디지털 회로 (IOI22_circuit) | C++17 | 1299 ms | 33176 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "circuit.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1000002022;
struct Vertex {
int s0, s1;
};
vector<int> c, now;
int dim, subtract;
vector<Vertex> tree;
vector<int> lazy;
void build(int v, int tl, int tr) {
lazy[v] = 0;
if (tl == tr) {
tree[v].s0 = now[tl] * c[tl];
tree[v].s1 = (1 - now[tl]) * c[tl];
} else {
int tm = (tl + tr) / 2;
build(2 * v, tl, tm);
build(2 * v + 1, tm + 1, tr);
tree[v].s0 = tree[2 * v].s0 + tree[2 * v + 1].s0;
tree[v].s1 = tree[2 * v].s1 + tree[2 * v + 1].s1;
if (tree[v].s0 >= MOD) tree[v].s0 -= MOD;
# | 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... |