#include <bits/stdc++.h>   using namespace std;   int main() {     int n, ai, m, xi, yi;     cin >> n;     vector<int> wire(100);     for (int i = 1; i <= n; i++) {       cin >> wire[i];     }     cin >> m;     for (int i = 1; i <= m; i++) {       cin >> xi >> yi;       wire[xi - 1] += (yi - 1);       wire[xi + 1] += (wire[xi] - yi);       wire[xi] = 0;     }     for (int i = 1; i <= n; i++) {       cout << wire[i] << endl;     }     return 0;   }   