func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int boxes;     cin >> boxes;     int arr[boxes];     for (int i = 0; i < boxes; i++) cin >> arr[i];     int shots;     cin >> shots;     int x, y;     for (int i = 0; i < shots; i++) {       cin >> x >> y;       if (x == 1) {         arr[x] += (arr[x - 1] - y);         arr[0] = 0;       } else if (x == boxes) {         arr[boxes - 1] = 0;         arr[x - 2] += (y - 1);       } else {         arr[x] += (arr[x - 1] - y);         arr[x - 2] += (y - 1);         arr[x - 1] = 0;       }     }     for (int i = 0; i < boxes; i++) cout << arr[i] << endl;   }   