/*
Author : Krish Italiya
Date : 20-04-2023
*/
#include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define ll long long int
#define vll vector<ll>
#define UB(v,x) distance(v.begin(),upper_bound(all(v),(x)))
#define LB(v,x) distance(v.begin(),lower_bound(all(v),(x)))
#define vpll vector<pair<ll,ll>>
#define vvll vector<vector<ll>>
#define pll pair<ll, ll>
#define mpll map<ll, ll>
#define ld long double
// #define float double
#define f(i, x, n) for (int i = x; i < n; i++)
#define rf(i, x, n) for (int i = x; i >= n; i--)
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define sz(a) (ll)a.size()
#define pi (3.141592653589)
#define min3(a,b,c) min(a,min(b,c))
#define min4(a,b,c,d) min(a,min(b,min(c,d)))
#define max3(a,b,c) max(a,max(b,c))
#define max4(a,b,c,d) max(a,max(b,max(c,d)))
#define max5(a,b,c,d,e) max(a,max(b,max(c,max(d,e))))
#define min5(a,b,c,d,e) min(a,min(b,min(c,min(d,e))))
bool isprime(ll number){if (number <= 1)return false;if (number == 2)return true;if (number % 2 == 0) return false;int boundary = (int)floor(sqrt(number));for (int i = 3; i <= boundary; i += 2)if (number % i == 0)return false;return true;}
ll gcd(ll x,ll y){if(y==0)return x;return gcd(y,x%y);}
ll exponentiation(long long a, long long b, long long c) {
long long ans = 1;
for(int i = 1;i <= b;i++) {
ans *= a; //multiplying a, b times.
ans %= c;
}
return ans;
}
#define slow ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
// #define mod 1000000007
#define mod 10000000007
#define endl '\n'
void solve(){
ll n,m,k;
cin>>n>>m>>k;
vll v(n+2);
f(i,1,n+1)cin>>v[i];
vector<vector<ll>> ops;
f(i,0,m){
ll l,r,d;
cin>>l>>r>>d;
ops.push_back({l,r,d});
}
ll qs[m+2] = {0};
f(i,0,k){
ll x,y;
cin>>x>>y;
qs[x] += 1;
qs[y+1] -= 1;
}
f(i,1,m+1){
qs[i] += qs[i-1];
}
// f(i,1,m+1){
// cout<<qs[i]<<" ";
// }cout<<endl;
ll add[n+2] = {0};
f(i,1,m+1){
ll l = ops[i-1][0];
ll r = ops[i-1][1];
ll d = ops[i-1][2];
// cout<<l<<" "<<r<<" "<<d<<endl;
add[l] += qs[i]*d;
add[r+1] -= qs[i]*d;
}
f(i,1,n+2){
add[i] += add[i-1];
}
f(i,1,n+1){
v[i] += add[i];
}
f(i,1,n+1){
cout<<v[i]<<" ";
}cout<<endl;
}
ll j=1;
int main()
{
slow;
ll tt = 1;
// cin>>tt;
while (tt--)
{
// cout<<"Case "<<j<<": "<<endl;
// cout<<"Scenario #"<<j<<":"<<endl;
solve();
j++;
}
return 0;
}
2090. K Radius Subarray Averages | 2091. Removing Minimum and Maximum From Array |
6. Zigzag Conversion | 1612B - Special Permutation |
1481. Least Number of Unique Integers after K Removals | 1035. Uncrossed Lines |
328. Odd Even Linked List | 1219. Path with Maximum Gold |
1268. Search Suggestions System | 841. Keys and Rooms |
152. Maximum Product Subarray | 337. House Robber III |
869. Reordered Power of 2 | 1593C - Save More Mice |
1217. Minimum Cost to Move Chips to The Same Position | 347. Top K Frequent Elements |
1503. Last Moment Before All Ants Fall Out of a Plank | 430. Flatten a Multilevel Doubly Linked List |
1290. Convert Binary Number in a Linked List to Integer | 1525. Number of Good Ways to Split a String |
72. Edit Distance | 563. Binary Tree Tilt |
1306. Jump Game III | 236. Lowest Common Ancestor of a Binary Tree |
790. Domino and Tromino Tiling | 878. Nth Magical Number |
2099. Find Subsequence of Length K With the Largest Sum | 1608A - Find Array |
416. Partition Equal Subset Sum | 1446. Consecutive Characters |