func_code_string: #include <bits/stdc++.h>   using namespace std;   queue<int> que;   vector<bool> init, goal;   vector<bool> visited;   vector<vector<int>> nodes;   void calculate(int root, bool flip1, bool flip2) {     const vector<int> &children = nodes[root];     visited[root] = true;     if (init[root] ^ flip1 != goal[root]) {       que.push(root + 1);       for (auto c : children) {         if (visited[c]) continue;         calculate(c, flip2, !flip1);       }     } else {       for (auto c : children) {         if (visited[c]) continue;         calculate(c, flip2, flip1);       }     }   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(nullptr);     int n;     cin >> n;     nodes.resize(n);     for (int i = 0; i < n - 1; ++i) {       int p, c;       cin >> c >> p;       nodes[p - 1].push_back(c - 1);       nodes[c - 1].push_back(p - 1);     }     init.resize(n);     for (int i = 0; i < n; ++i) {       int b;       cin >> b;       init[i] = b;     }     goal.resize(n);     for (int i = 0; i < n; ++i) {       int b;       cin >> b;       goal[i] = b;     }     visited.resize(n, false);     calculate(0, false, false);     cout << que.size() << endl;     while (!que.empty()) {       cout << que.front() << endl;       que.pop();     }     return 0;   }   