# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
400959 | Hegdahl | The Xana coup (BOI21_xanadu) | C++17 | 90 ms | 32560 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>
#define ar array
using namespace std;
using ll = long long;
const ll INF = 1e9;
const int mxN = 1e5;
vector<int> g[mxN];
int a[mxN];
// 0b(pressed)(state)
ar<ll, 4> solve(int cur, int prv) {
int kid_cnt = 0;
for (int nxt : g[cur]) {
if (nxt == prv) continue;
++kid_cnt;
}
if (!kid_cnt) {
ar<ll, 4> ret {INF, INF, INF, INF};
if (a[cur]) {
ret[0b01] = 0;
ret[0b10] = 1;
} else {
ret[0b00] = 0;
ret[0b11] = 1;
}
/*
# | 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... |