func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n;     cin >> n;     int arr[n + 1];     for (int i = 1; i <= n; i++) cin >> arr[i];     int x;     cin >> x;     int w, l;     while (x--) {       cin >> w >> l;       if (w == 1) {         arr[2] += arr[1] - l;         arr[1] = 0;         continue;       }       if (w == n) {         arr[n - 1] += l - 1;         arr[n] = 0;         continue;       }       arr[w - 1] += l - 1;       arr[w + 1] += arr[w] - l;       arr[w] = 0;     }     for (int i = 1; i <= n; i++) {       cout << arr[i] << endl;     }     return 0;   }   