# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
960993 | Gr1sen | The Xana coup (BOI21_xanadu) | C++17 | 85 ms | 17004 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<iostream>
#include<vector>
#include<algorithm>
#include<iomanip>
using namespace std;
#define vi vector<int>
#define vvi vector<vi>
int inf = 1e8;
struct point {
int a = inf, b = inf, c = inf, d = inf; // no flip on, flip on, no flip off, flip off
};
vi O;
vvi Adj;
point oink(int p, int dfp) {
if (Adj[p].size() == 1 && Adj[p][0] == dfp) {
if (O[p]) return {0, inf, inf, 1};
return {inf, 1, 0, inf};
}
bool q = 1;
point l;
for (auto i : Adj[p]) {
if (i == dfp) continue;
point o = oink(i, p);
//cerr << "o: " << o.a << ", " << o.b << ", " << o.c << ", " << o.d << "; p:" << i+1 << endl;
# | 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... |