func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long Max = 2e5 + 9, inf = 1e18;   long long A[Max], B[Max], d[Max];   int find_nxt(long long id, long long x) {     if (A[id] - B[id] >= x) return B[id] += x, id;     d[id] = find_nxt(d[id], x - A[id] + B[id]), B[id] = A[id];     return d[id];   }   int main() {     ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);     long long n, m, a, id, x;     cin >> n;     for (int i = 1; i <= n; i++) cin >> A[i], d[i] = i + 1;     A[n + 1] = inf;     cin >> m;     while (m--) {       cin >> a >> id;       if (a == 1) {         cin >> x;         find_nxt(id, x);       } else         cout << B[id] <<   n ;     }   }   