func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<int> g[201010];   int tin[201010], tout[201010];   int n, a[201010], m, timer;   int is[201010], lvl[201010];   void dfs(int v) {     tin[v] = ++timer;     for (auto to : g[v])       if (!tin[to]) {         lvl[to] = lvl[v] ^ 1;         dfs(to);       }     tout[v] = timer;   }   int t[2][801010];   void upd(int l, int r, int x, bool tp, int v = 1, int tl = 1, int tr = n) {     if (tl > r || tr < l) return;     if (tl >= l && tr <= r) {       t[tp][v] += x;       t[tp ^ 1][v] -= x;       return;     }     int tm = (tl + tr) / 2;     upd(l, r, x, tp, v * 2, tl, tm);     upd(l, r, x, tp, v * 2 + 1, tm + 1, tr);   }   int get(int x, bool tp, int v = 1, int tl = 1, int tr = n) {     if (tl == tr) return t[tp][v];     int tm = (tl + tr) / 2;     if (x <= tm)       return t[tp][v] + get(x, tp, v * 2, tl, tm);     else       return t[tp][v] + get(x, tp, v * 2 + 1, tm + 1, tr);   }   int main() {     cin >> n >> m;     for (int i = 1; i <= n; i++) cin >> a[i];     for (int i = 1, u, v; i < n; i++) {       cin >> u >> v;       g[v].push_back(u);       g[u].push_back(v);     }     dfs(1);     for (int i = 1, x, val, tt; i <= m; i++) {       cin >> tt >> x;       if (tt == 2) {         cout << a[x] + get(tin[x], lvl[x]) <<   n ;         continue;       }       cin >> val;       upd(tin[x], tout[x], val, lvl[x]);     }   }   