# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
885185 | SkillIssueWAGuy | Spring cleaning (CEOI20_cleaning) | C++14 | 140 ms | 33172 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<vector>
#include<iostream>
#include<utility>
#include<algorithm>
#include<cmath>
using namespace std;
namespace fake{
std::vector<std::vector<int>> tree;
std::vector<int> incount, dp, flips, normals, full, parent;
void setup(int n){
tree = std::vector<std::vector<int>>(n, std::vector<int>(0));
dp = parent = std::vector<int>(n, -1);
incount = std::vector<int>(n, 0);
}
void dfs(int node){
if (tree[node].size() == 0){
dp[node] = 1;
if (incount[node] == -1){
dp[node] = 0;
}
return;
}
dp[node] = 0;
for (int i : tree[node]){
dfs(i);
dp[node] += dp[i];
}
dp[node] %= 2;
if (incount[node] == -2){
dp[node] = 1 - dp[node];
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |