# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
647912 | thorie | The Xana coup (BOI21_xanadu) | C++17 | 1099 ms | 12640 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;
vector<vector<int>> graph;
vector<bool> on;
vector<bool> onCopy;
vector<int> v1;
vector<int> v2;
void toggle(int k) {
on[k] = !on[k];
for (int i = 0; i < graph[k].size(); i++) {
on[graph[k][i]] = !on[graph[k][i]];
}
}
void dfs(int x, bool y, int from) {
if (y) {
v1.push_back(x);
}
else {
v2.push_back(x);
}
for (int i = 0; i < graph[x].size(); i++) {
if (graph[x][i] != from) {
dfs(graph[x][i], !y, x);
}
}
}
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... |