func_code_string: #include <bits/stdc++.h>   using ll = long long;   using ld = long double;   using ull = unsigned long long;   using namespace std;   const int N = 1e5 + 2, SQ = 400;   int n, q, a[N], jump[N], cost[N];   int main() {     ios_base::sync_with_stdio(false);     cin.tie(nullptr);     cin >> n >> q;     for (int i = (0); i <= (n - 1); ++i) cin >> a[i];     for (int i = (n - 1); i >= (0); --i) {       int nxt = min(n, i + a[i]);       if (nxt == n) {         jump[i] = i;         continue;       }       if (nxt / SQ > i / SQ)         jump[i] = nxt, cost[i] = 1;       else         jump[i] = jump[nxt], cost[i] = cost[nxt] + 1;     }     while (q--) {       int t;       cin >> t;       if (t == 0) {         int x, y;         cin >> x >> y;         x--;         a[x] = y;         for (int i = (x); i >= (x / SQ * SQ); --i) {           int nxt = min(n, i + a[i]);           if (nxt == n) {             jump[i] = i;             cost[i] = 0;             continue;           }           if (nxt / SQ > i / SQ)             jump[i] = nxt, cost[i] = 1;           else             jump[i] = jump[nxt], cost[i] = cost[nxt] + 1;         }       } else {         int x, res = 1;         cin >> x;         x--;         while (cost[x]) res += cost[x], x = jump[x];         cout << x + 1 <<     << res <<   n ;       }     }     return 0;   }   