func_code_string: #include <bits/stdc++.h>   int in[101], od[101], fa[101], n;   int f[101], f2[102];   inline int find(int a) {     if (fa[a] != a) fa[a] = find(fa[a]);     return fa[a];   }   inline void u(int x, int y) {     x = find(x);     y = find(y);     fa[y] = x;   }   signed main() {     scanf( %d , &n);     for (register int i = 1; i <= n; i++) fa[i] = i;     for (register int i = 1; i <= n; i++) scanf( %d , &in[i]);     for (register int i = 1; i <= n; i++) {       scanf( %d , &od[i]);       if (i - od[i] > 0) u(in[i], in[i - od[i]]);       if (i + od[i] <= n) u(in[i], in[i + od[i]]);     }     for (register int i = 1; i <= n; i++) {       f[find(i)] += i;       f2[find(i)] += in[i];     }     for (register int i = 1; i <= n; i++) {       if (f[i] ^ f2[i]) {         printf( NO n );         return 0;       }     }     printf( YES n );   }   