# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
403941 | Nordway | The Xana coup (BOI21_xanadu) | C++17 | 140 ms | 14936 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 pb push_back
using namespace std;
const int N = 1e5 + 1;
const int inf = 1e9;
bool turned[N];
vector <int> g[N];
int dp[N][2][2];
void dfs(int v, int p) {
for (int to : g[v]) {
if (to != p) {
dfs(to, v);
}
}
int sum = 0;
bool flip = 0;
dp[v][0][0] = inf;
dp[v][0][1] = inf;
dp[v][1][0] = inf;
dp[v][1][1] = inf;
for (int to : g[v]) {
if (to != p) {
if (dp[to][0][0] == inf && dp[to][0][1] == inf) {
# | 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... |