#include <bits/stdc++.h>   using namespace std;   const int mod = 1000000007;   const int N = 128;   int num[N];   int main() {     int n;     cin >> n;     for (int i = 1; i <= n; ++i) {       cin >> num[i];     }     int m;     cin >> m;     for (int i = 0; i < m; ++i) {       int x, y;       cin >> x >> y;       num[x - 1] += y - 1;       num[x + 1] += num[x] - y;       num[x] = 0;     }     for (int i = 1; i <= n; ++i) {       cout << num[i] << endl;     }   }   