func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 10001;   vector<int> g[maxn];   int res;   int color[maxn];   int vis[maxn];   void solve(int root, int c) {     vis[root] = 1;     if (color[root] != c) res++;     for (int i = 0; i < g[root].size(); i++) {       int to = g[root][i];       if (vis[to]) continue;       solve(to, color[root]);     }   }   int main() {     int n;     scanf( %d , &n);     memset(vis, 0, sizeof(vis));     for (int i = 2; i <= n; i++) {       int t;       scanf( %d , &t);       g[i].push_back(t);       g[t].push_back(i);     }     for (int i = 1; i <= n; i++) scanf( %d , &color[i]);     res = 1;     solve(1, color[1]);     cout << res << endl;     return 0;   }   