#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <memory.h>
#include <cassert>

using namespace std;

#define out(x) cerr << #x"=" << x << endl

const int N = 1e5 + 10;

int n, m, k;
long long a[N];
int ll[4 * N];
int rr[4 * N];
long long cnt[4 * N];
int l[N], r[N], d[N];
int x[N], y[N];
long long cntchg[N];

void build(int root, int l, int r) {
  ll[root] = l;
  rr[root] = r;
  cnt[root] = 0;
  if (l < r) {
    build(2 * root, l, (l + r) / 2);
    build(2 * root + 1, (l + r) / 2 + 1, r);
  }
}

void add(int root, int l, int r, long long c) {
  if (l <= ll[root] && r >= rr[root]) {
    cnt[root] += c;
    return;
  }
  int mid = (ll[root] + rr[root]) / 2;
  if (l <= mid) {
    add(2 * root, l, mid, c);
  }
  if (r > mid) {
    add(2 * root + 1, mid + 1, r, c);
  }
}

long long query(int root, int leaf) {
  if (ll[root] == leaf && rr[root] == leaf)
    return cnt[root];
  if (!(ll[root] <= leaf && rr[root] >= leaf))
    return 0;
  long long res = 0;
  int mid = (ll[root] + rr[root]) / 2;
  res += cnt[root];
  if (leaf <= mid) {
    res += query(2 * root, leaf);
  }
  else {
    res += query(2 * root + 1, leaf);
  }
  return res;
}

int main() {
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%I64d", a + i);
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d%d", l + i, r + i, d + i);
  }
  for (int i = 0; i < k; ++i) {
    scanf("%d%d", x + i, y + i);
  }
  build(1, 1, m);
  for (int i = 0; i < k; ++i) {
    add(1, x[i], y[i], 1);
  }
  for (int i = 1; i <= m; ++i) {
    cntchg[i] = query(1, i);
  }
//  for (int i = 1; i <= m; ++i) {
//    printf("%d ", cntchg[i]);
//  }
//  printf("\n");
  build(1, 1, n);
  for (int i = 1; i <= m; ++i) {
    add(1, l[i], r[i], cntchg[i] * d[i]);
  }
  for (int i = 1; i <= n; ++i) {
    a[i] += query(1, i);
  }
  printf("%I64d", a[1]);
  for (int i = 2; i <= n; ++i) {
    printf(" %I64d", a[i]);
  }
  printf("\n");
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <memory.h>
#include <cassert>

using namespace std;

#define out(x) cerr << #x"=" << x << endl

const int N = 1e5 + 10;

long long a[N], b[N], c[N], d[N];
int l[N], r[N], n, m, k, x[N], y[N];

int main() {
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%I64d", a + i);
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d%I64d", l + i, r + i, d + i);
  }
  for (int i = 1; i <= k; ++i) {
    scanf("%d%d", x + i, y + i);
    ++b[x[i]];
    --b[y[i] + 1];
  }
  for (int i = 2; i <= m; ++i) {
    b[i] += b[i - 1];
  }
  for (int i = 1; i <= m; ++i) {
    c[l[i]] += b[i] * d[i];
    c[r[i] + 1] -= b[i] * d[i];
  }
  for (int i = 2; i <= n; ++i) {
    c[i] += c[i - 1];
  }
  for (int i = 1; i < n; ++i) {
    printf("%I64d ", a[i] + c[i]);
  }
  printf("%I64d\n", a[n] + c[n]);
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <memory.h>
#include <cassert>

using namespace std;

#define out(x) cerr << #x"=" << x << endl

const int N = 1e5 + 10;

int n, m, k;
int a[N];
int ll[4 * N];
int rr[4 * N];
long long cnt[3 * N];
int l[N], r[N], d[N];
int x[N], y[N];
long long cntchg[N];

void build(int root, int l, int r) {
  ll[root] = l;
  rr[root] = r;
  cnt[root] = 0;
  if (l < r) {
    build(2 * root, l, (l + r) / 2);
    build(2 * root + 1, (l + r) / 2 + 1, r);
  }
}

void add(int root, int l, int r, long long c) {
  if (l <= ll[root] && r >= rr[root]) {
    cnt[root] += c;
    return;
  }
  int mid = (ll[root] + rr[root]) / 2;
  if (l <= mid) {
    add(2 * root, l, mid, c);
  }
  if (r > mid) {
    add(2 * root + 1, mid + 1, r, c);
  }
}

long long query(int root, int leaf) {
  if (ll[root] == leaf && rr[root] == leaf)
    return cnt[root];
  if (!(ll[root] <= leaf && rr[root] >= leaf))
    return 0;
  long long res = 0;
  int mid = (ll[root] + rr[root]) / 2;
  res += cnt[root];
  if (leaf <= mid) {
    res += query(2 * root, leaf);
  }
  else {
    res += query(2 * root + 1, leaf);
  }
  return res;
}

int main() {
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d%d", l + i, r + i, d + i);
  }
  for (int i = 0; i < k; ++i) {
    scanf("%d%d", x + i, y + i);
  }
  build(1, 1, m);
  for (int i = 0; i < k; ++i) {
    add(1, x[i], y[i], 1);
  }
  for (int i = 1; i <= m; ++i) {
    cntchg[i] = query(1, i);
  }
//  for (int i = 1; i <= m; ++i) {
//    printf("%d ", cntchg[i]);
//  }
//  printf("\n");
  build(1, 1, n);
  for (int i = 1; i <= m; ++i) {
    add(1, l[i], r[i], cntchg[i] * d[i]);
  }
  for (int i = 1; i <= n; ++i) {
    a[i] += query(1, i);
  }
  printf("%d", a[1]);
  for (int i = 2; i <= n; ++i) {
    printf(" %d", a[i]);
  }
  printf("\n");
  return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	int n,m,k;
	scanf("%d %d %d",&n,&m,&k);
	int ar[n+1];
	for(int i=1;i<=n;i++)
	scanf("%d",&ar[i]);
	int op[m+1][3];
	for(int i=1;i<=m;i++)
	{
		scanf("%d %d %d",&op[i][0],&op[i][1],&op[i][2]);
	}

	int sum[m+5];
	memset(sum,0,sizeof(sum));
	for(int i=0;i<k;i++)
	{
		int x,y;
		scanf("%d %d",&x,&y);
		sum[x]+=1;
		sum[y+1]+=(-1);
	}

	long long int final[n+5];
	memset(final,0,sizeof(final));
	int c=0;
	for(int i=1;i<=m;i++)
	{
		c+=sum[i];
		final[op[i][0]]+=(c*op[i][2]);
		final[op[i][1]+1]+=(-1*c*op[i][2]);
	}
	for(int i=1;i<=n+1;i++)
	{
		final[i]=final[i-1]+final[i];
	}

	for(int i=1;i<=n;i++)
	printf("%lld ",(ar[i]+final[i]));
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	int n,m,k;
	scanf("%d %d %d",&n,&m,&k);
	int ar[n+1];
	for(int i=0;i<n;i++)
	scanf("%d",&ar[i]);
	int op[m+1][3];
	for(int i=1;i<=m;i++)
	{
		scanf("%d %d %d",&op[i][0],&op[i][1],&op[i][2]);
	}

	int sum[m+5];
	memset(sum,0,sizeof(sum));
	for(int i=0;i<k;i++)
	{
		int x,y;
		scanf("%d %d",&x,&y);
		sum[x]+=1;
		sum[y+1]+=(-1);
	}

	long long int final[100005]={0};
	int c=0;
	for(int i=1;i<=m;i++)
	{
		c+=sum[i];
		final[op[i][0]]+=(c*op[i][2]);
		final[op[i][1]+1]+=(-1*c*op[i][2]);
	}
	for(int i=1;i<=100000;i++)
	{
		final[i]=final[i-1]+final[i];
	}

	for(int i=0;i<n;i++)
	printf("%lld ",(ar[i]+final[i+1]));
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	int n,m,k;
	scanf("%d %d %d",&n,&m,&k);
	int ar[n+1];
	for(int i=1;i<=n;i++)
	scanf("%d",&ar[i]);
	int op[m+1][3];
	for(int i=1;i<=m;i++)
	{
		scanf("%d %d %d",&op[i][0],&op[i][1],&op[i][2]);
	}

	int sum[m+5];
	memset(sum,0,sizeof(sum));
	for(int i=0;i<k;i++)
	{
		int x,y;
		scanf("%d %d",&x,&y);
		sum[x]+=1;
		sum[y+1]-=1;
	}
	for(int i=1;i<=m;i++)
	sum[i]=sum[i]+sum[i-1];
	long long int final[n+5];
	memset(final,0,sizeof(final));
	long long int c=0;
	for(int i=1;i<=m;i++)
	{
		c=sum[i];
		final[op[i][0]]+=(c*op[i][2]);
		final[op[i][1]+1]-=(c*op[i][2]);
	}
	for(int i=1;i<=n;i++)
	{
		final[i]=final[i-1]+final[i];
	}

	for(int i=1;i<=n;i++)
	printf("%lld ",(ar[i]+final[i]));
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	int n,m,k;
	scanf("%d %d %d",&n,&m,&k);
	int ar[n+1];
	for(int i=1;i<=n;i++)
	scanf("%d",&ar[i]);
	int op[m+1][3];
	for(int i=1;i<=m;i++)
	{
		scanf("%d %d %d",&op[i][0],&op[i][1],&op[i][2]);
	}

	int sum[m+5];
	memset(sum,0,sizeof(sum));
	for(int i=0;i<k;i++)
	{
		int x,y;
		scanf("%d %d",&x,&y);
		sum[x]+=1;
		sum[y+1]-=1;
	}
	//for(int i=1;i<=m;i++)
	//sum[i]=sum[i]+sum[i-1];
	long long int final[n+5];
	memset(final,0,sizeof(final));
	long long int c=0;
	for(int i=1;i<=m;i++)
	{
		c+=sum[i];
		final[op[i][0]]+=(c*op[i][2]);
		final[op[i][1]+1]-=(c*op[i][2]);
	}
	for(int i=1;i<=n;i++)
	{
		final[i]=final[i-1]+final[i];
	}

	for(int i=1;i<=n;i++)
	printf("%lld ",(ar[i]+final[i]));
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	int n,m,k;
	scanf("%d %d %d",&n,&m,&k);
	int ar[n+1];
	for(int i=0;i<n;i++)
	scanf("%d",&ar[i]);
	int op[m+1][3];
	for(int i=1;i<=m;i++)
	{
		scanf("%d %d %d",&op[i][0],&op[i][1],&op[i][2]);
	}

	int sum[m+5];
	memset(sum,0,sizeof(sum));
	for(int i=0;i<k;i++)
	{
		int x,y;
		scanf("%d %d",&x,&y);
		sum[x]+=1;
		sum[y+1]+=(-1);
	}

	long long int final[100005]={0};
	int c=0;
	for(int i=1;i<=m;i++)
	{
		c+=sum[i];
		final[op[i][0]]+=(c*op[i][2]);
		final[op[i][1]+1]+=(-1*c*op[i][2]);
	}
	for(int i=1;i<=100000;i++)
	{
		final[i]=final[i-1]+final[i];
	}

	for(int i=0;i<n;i++)
	printf("%lld ",(ar[i]+final[ar[i]]));
	return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

unsigned long long int tree1[100005];
unsigned long long int tree2[100005];
unsigned long long int a[100005],l[100005],r[100005],d[100005];
unsigned long long int Maxval=111111;

unsigned long long int read1(unsigned long long int idx)
{
    unsigned long long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update1(unsigned long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx+=(idx&-idx);
    }
}

unsigned long int read2(unsigned long long int idx)
{
    unsigned long long int sum=0;
    while(idx>0)
    {
        sum+=tree2[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update2(unsigned long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx+=(idx&-idx);
    }
}

int main()
{
    freopen("read.txt","r",stdin);
  freopen("write.txt","w",stdout);
unsigned long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,1,k+1)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
  long int temp;
  FOR(i,1,m+1)
  {
      temp=read1(i);
      update2(l[i],d[i]*temp);
      update2(r[i]+1,-(d[i]*temp));

  }
  FOR(i,1,n+1) cout<<read2(i)+a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

 int tree1[100005];
 long long int tree2[100005];
 long long int a[100005],l[100005],r[100005],d[100005];
  long int Maxval=100100;

 long long int read1(int idx)
{
 long long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx -=(idx & -idx);
    }
    return sum;
}

void update1(int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx += (idx & -idx);
    }
}

 long int read2(int idx)
{
long int sum=0;
    while(idx>0)
    {
        sum += tree2[idx];
        idx -= (idx &- idx);
    }
    return sum;
}

void update2( int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx += (idx &- idx);
    }
}

int main()
{

long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,0,k)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
   long int temp[100005];

  FOR(i,1,m+1)
  temp[i]=read1(i);
  FOR(i,1,m+1)
  {

      update2(l[i],d[i]*temp[i]);
      update2(r[i]+1,-d[i]*temp[i]);

  }
  FOR(i,1,n+1) a[i]+=read2(i);
    FOR(i,1,n+1) cout<<a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

 long int tree1[111111];
 long long int tree2[111111];
 long long int a[100005],l[100005],r[100005],d[100005];
  long int Maxval=100100;

 long int read1(long int idx)
{
  long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx -=(idx & -idx);
    }
    return sum;
}

void update1(long int idx, long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx += (idx & -idx);
    }
}

long long int read2(long int idx)
{
long long int sum=0;
    while(idx>0)
    {
        sum += tree2[idx];
        idx -= (idx &- idx);
    }
    return sum;
}

void update2(long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx += (idx &- idx);
    }
}

int main()
{

long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,0,k)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
   long int temp[111111];

  FOR(i,1,m+1)
  temp[i]=read1(i);
  FOR(i,1,m+1)
  {

      update2(l[i],d[i]*temp[i]);
      update2(r[i]+1,-d[i]*temp[i]);

  }
  FOR(i,1,n+1) a[i]+=read2(i);
    FOR(i,1,n+1) cout<<a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

 int tree1[111111];
 long long int tree2[111111];
 long long int a[100005],l[100005],r[100005],d[100005];
  long int Maxval=100100;

 int read1(int idx)
{
    int sum=0;
    while(idx>0)
    {
        sum += tree1[idx];
        idx -= (idx & -idx);
    }
    return sum;
}

void update1(int idx, int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx += (idx & -idx);
    }
}

 long long int read2(int idx)
{
long long int sum=0;
    while(idx>0)
    {
        sum += tree2[idx];
        idx -= (idx &- idx);
    }
    return sum;
}

void update2( int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx] += val;
        idx += (idx &- idx);
    }
}

int main()
{

long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,0,k)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
   long int temp[100005];

  FOR(i,1,m+1)
  temp[i]=read1(i);
  FOR(i,1,m+1)
  {

      update2(l[i],d[i]*temp[i]);
      update2(r[i]+1,-d[i]*temp[i]);

  }
  FOR(i,1,n+1) a[i]+=read2(i);
    FOR(i,1,n+1) cout<<a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

 int tree1[100005];
 long long int tree2[100005];
 long long int a[100005],l[100005],r[100005],d[100005];
  long int Maxval=100100;

 long long int read1(long long int idx)
{
 long long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update1( long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx+=(idx&-idx);
    }
}

 long int read2(long long int idx)
{
 long long int sum=0;
    while(idx>0)
    {
        sum+=tree2[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update2(long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx+=(idx&-idx);
    }
}

int main()
{

long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,0,k)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
   long int temp[100005];

  FOR(i,1,m+1)
  temp[i]=read1(i);
  FOR(i,1,m+1)
  {

      update2(l[i],d[i]*temp[i]);
      update2(r[i]+1,-d[i]*temp[i]);

  }
  FOR(i,1,n+1) a[i]+=read2(i);
    FOR(i,1,n+1) cout<<a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

unsigned long long int tree1[100005];
unsigned long long int tree2[100005];
unsigned long long int a[100005],l[100005],r[100005],d[100005];
unsigned long long int Maxval=111111;

unsigned long long int read1(unsigned long long int idx)
{
    unsigned long long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update1(unsigned long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx+=(idx&-idx);
    }
}

unsigned long int read2(unsigned long long int idx)
{
    unsigned long long int sum=0;
    while(idx>0)
    {
        sum+=tree2[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update2(unsigned long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx+=(idx&-idx);
    }
}

int main()
{

unsigned long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,1,k+1)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
  long long int temp;
  FOR(i,1,m+1)
  {
      temp=read1(i);
      update2(l[i],d[i]*temp);
      update2(r[i]+1,-(d[i]*temp));

  }
  FOR(i,1,n+1) cout<<read2(i)+a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

long long int tree1[111111];
long long int tree2[111111];
long long int a[100005],l[100005],r[100005],d[100005];
long int Maxval=111111;

long long int read1(long long int idx)
{
    long long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update1(long long int idx,long long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx+=(idx&-idx);
    }
}

long long int read2(long long int idx)
{
    long long int sum=0;
    while(idx>0)
    {
        sum+=tree2[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update2(long long int idx,long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx+=(idx&-idx);
    }
}

int main()
{
 long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,0,n) cin>>a[i];
  FOR(i,0,m) cin>>l[i]>>r[i]>>d[i];
  FOR(i,0,k)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
  long long int temp;
  FOR(i,0,m)
  {
      temp=read1(i+1);
      update2(l[i],d[i]*temp);
      update2(r[i]+1,-d[i]*temp);

  }
  FOR(i,1,n+1) cout<<read2(i)+a[i-1]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

 int tree1[111111];
 long long int tree2[111111];
 long long int a[100005],l[100005],r[100005],d[100005];
  long int Maxval=100100;

 long int read1(long int idx)
{
  long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx -=(idx & -idx);
    }
    return sum;
}

void update1(long int idx, long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx += (idx & -idx);
    }
}

long long int read2(long int idx)
{
long long int sum=0;
    while(idx>0)
    {
        sum += tree2[idx];
        idx -= (idx &- idx);
    }
    return sum;
}

void update2(long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx += (idx &- idx);
    }
}

int main()
{

long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,0,k)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
   long int temp[111111];

  FOR(i,1,m+1)
  temp[i]=read1(i);
  FOR(i,1,m+1)
  {

      update2(l[i],d[i]*temp[i]);
      update2(r[i]+1,-d[i]*temp[i]);

  }
  FOR(i,1,n+1) a[i]+=read2(i);
    FOR(i,1,n+1) cout<<a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

 int tree1[111111];
 long long int tree2[111111];
 long long int a[100005],l[100005],r[100005],d[100005];
  long int Maxval=100100;

 long long int read1(int idx)
{
 long long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx -=(idx & -idx);
    }
    return sum;
}

void update1(int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx += (idx & -idx);
    }
}

 long int read2(int idx)
{
long int sum=0;
    while(idx>0)
    {
        sum += tree2[idx];
        idx -= (idx &- idx);
    }
    return sum;
}

void update2( int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx += (idx &- idx);
    }
}

int main()
{

long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,0,k)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
   long int temp[100005];

  FOR(i,1,m+1)
  temp[i]=read1(i);
  FOR(i,1,m+1)
  {

      update2(l[i],d[i]*temp[i]);
      update2(r[i]+1,-d[i]*temp[i]);

  }
  FOR(i,1,n+1) a[i]+=read2(i);
    FOR(i,1,n+1) cout<<a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

unsigned long long int tree1[100005];
unsigned long long int tree2[100005];
unsigned long long int a[100005],l[100005],r[100005],d[100005];
unsigned long long int Maxval=111111;

unsigned long long int read1(unsigned long long int idx)
{
    unsigned long long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update1(unsigned long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx+=(idx&-idx);
    }
}

unsigned long int read2(unsigned long long int idx)
{
    unsigned long long int sum=0;
    while(idx>0)
    {
        sum+=tree2[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update2(unsigned long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx+=(idx&-idx);
    }
}

int main()
{

unsigned long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,1,k+1)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
  long int temp;
  FOR(i,1,m+1)
  {
      temp=read1(i);
      update2(l[i],d[i]*temp);
      update2(r[i]+1,-(d[i]*temp));

  }
  FOR(i,1,n+1) cout<<read2(i)+a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

 long long int tree1[100005];
 long long int tree2[100005];
 long long int a[100005],l[100005],r[100005],d[100005];
 long long int Maxval=111111;

 long long int read1(long long int idx)
{
 long long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update1( long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx+=(idx&-idx);
    }
}

 long int read2(long long int idx)
{
 long long int sum=0;
    while(idx>0)
    {
        sum+=tree2[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update2(long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx+=(idx&-idx);
    }
}

int main()
{

long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,1,k+1)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
  long long int temp;
  FOR(i,1,m+1)
  {
      temp=read1(i);
      update2(l[i],d[i]*temp);
      update2(r[i]+1,-d[i]*temp);

  }
  FOR(i,1,n+1) cout<<read2(i)+a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

 long long int tree1[100005];
 long long int tree2[100005];
 long long int a[100005],l[100005],r[100005],d[100005];
  long int Maxval=100010;

 long long int read1(long long int idx)
{
 long long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update1( long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx+=(idx&-idx);
    }
}

 long int read2(long long int idx)
{
 long long int sum=0;
    while(idx>0)
    {
        sum+=tree2[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update2(long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx+=(idx&-idx);
    }
}

int main()
{

long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,0,k)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
   long int temp[100005];

  FOR(i,1,m+1)
  temp[i]=read1(i);
  FOR(i,1,m+1)
  {

      update2(l[i],d[i]*temp[i]);
      update2(r[i]+1,-d[i]*temp[i]);

  }
  FOR(i,1,n+1) a[i]+=read2(i);
    FOR(i,1,n+1) cout<<a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

 long long int tree1[100005];
 long long int tree2[100005];
 long long int a[100005],l[100005],r[100005],d[100005];
 long long int Maxval=100010;

 long long int read1(long long int idx)
{
 long long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update1( long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx+=(idx&-idx);
    }
}

 long int read2(long long int idx)
{
 long long int sum=0;
    while(idx>0)
    {
        sum+=tree2[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update2(long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx+=(idx&-idx);
    }
}

int main()
{

long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,1,k+1)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
  long long int temp;
  FOR(i,1,m+1)
  {
      temp=read1(i);
      update2(l[i],d[i]*temp);
      update2(r[i]+1,-d[i]*temp);

  }
  FOR(i,1,n+1) cout<<read2(i)+a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

 long int tree1[111111];
 long long int tree2[111111];
 long long int a[100005],l[100005],r[100005],d[100005];
  long int Maxval=100100;

 long long int read1(long long int idx)
{
  long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx -=(idx & -idx);
    }
    return sum;
}

void update1(long long int idx,long long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx += (idx & -idx);
    }
}

long long int read2(long long int idx)
{
long long int sum=0;
    while(idx>0)
    {
        sum += tree2[idx];
        idx -= (idx &- idx);
    }
    return sum;
}

void update2(long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx += (idx &- idx);
    }
}

int main()
{

long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,0,k)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
   long int temp[111111];

  FOR(i,1,m+1)
  temp[i]=read1(i);
  FOR(i,1,m+1)
  {

      update2(l[i],d[i]*temp[i]);
      update2(r[i]+1,-d[i]*temp[i]);

  }
  FOR(i,1,n+1) a[i]+=read2(i);
    FOR(i,1,n+1) cout<<a[i]<<" ";
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <cassert>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include<stdio.h>
#define FOR(i,a,b) for(long int i=a;i<b;i++)

using namespace std;

 long long int tree1[100005];
 long long int tree2[100005];
 long long int a[100005],l[100005],r[100005],d[100005];
 long long int Maxval=111111;

 long long int read1(long long int idx)
{
 long long int sum=0;
    while(idx>0)
    {
        sum+=tree1[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update1( long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree1[idx]+=val;
        idx+=(idx&-idx);
    }
}

 long int read2(unsigned long long int idx)
{
 long long int sum=0;
    while(idx>0)
    {
        sum+=tree2[idx];
        idx-=(idx&-idx);
    }
    return sum;
}

void update2(long long int idx, long long int val)
{
    while(idx<=Maxval)
    {
        tree2[idx]+=val;
        idx+=(idx&-idx);
    }
}

int main()
{

long long int n,m,k,x,y;
  cin>>n>>m>>k;
  FOR(i,1,n+1) cin>>a[i];
  FOR(i,1,m+1) cin>>l[i]>>r[i]>>d[i];
  FOR(i,1,k+1)
  {
      cin>>x>>y;
      update1(x,1);
      update1(y+1,-1);

  }
  long long int temp;
  FOR(i,1,m+1)
  {
      temp=read1(i);
      update2(l[i],d[i]*temp);
      update2(r[i]+1,-d[i]*temp);

  }
  FOR(i,1,n+1) cout<<read2(i)+a[i]<<" ";
  return 0;
}


#include<iostream>
using namespace std;
long long int arr[100002]={0};
long long int brr[100002]={0};
long long int crr[100002]={0};
long long int query[100002][3]={0};

int main()
{
long long int i,j,m,n,k,a,b,c;
cin>>n>>m>>k;

for(i=1;i<=n;i++)
cin>>arr[i];
for(i=1;i<=m;i++)
{
cin>>a>>b>>c;
query[i][0]=a;
query[i][1]=b;
query[i][2]=c;
}

for(j=1;j<=k;j++)
{
cin>>a>>b;
crr[a]+=1;
crr[b+1]=crr[b+1]-1;
}

for(i=1;i<=n;i++)
crr[i]=crr[i]+crr[i-1];

for(i=1;i<=n;i++)
{
a=query[i][0];
b=query[i][1];
c=query[i][2];
brr[a]=brr[a]+(crr[i]*c);
brr[b+1]=brr[b+1]-(crr[i]*c);
}

for(i=1;i<=n;i++)
brr[i]=brr[i-1]+brr[i];
/*
for(i=1;i<=n;i++)
cout<<crr[i]<<" ";
cout<<endl;
*/
for(i=1;i<=n;i++)
cout<<brr[i]+arr[i]<<" ";
cout<<endl;
return 0;
}


#include<iostream>
using namespace std;
long long int arr[100002]={0};
long long int brr[100002]={0};
long long int crr[100002]={0};
long long int query[100002][3]={0};

int main()
{
long long long int i,j,m,n,k,a,b,c;
cin>>n>>m>>k;

for(i=1;i<=n;i++)
cin>>arr[i];
for(i=1;i<=m;i++)
{
cin>>a>>b>>c;
query[i][0]=a;
query[i][1]=b;
query[i][2]=c;
}

for(j=1;j<=k;j++)
{
cin>>a>>b;
crr[a]+=1;
crr[b+1]=crr[b+1]-1;
}

for(i=1;i<=n;i++)
crr[i]=crr[i]+crr[i-1];

for(i=1;i<=n;i++)
{
a=query[i][0];
b=query[i][1];
c=query[i][2];
brr[a]=brr[a]+(crr[i]*c);
brr[b+1]=brr[b+1]-(crr[i]*c);
}

for(i=1;i<=n;i++)
brr[i]=brr[i-1]+brr[i];
/*
for(i=1;i<=n;i++)
cout<<crr[i]<<" ";
cout<<endl;
*/
for(i=1;i<=n;i++)
cout<<brr[i]+arr[i]<<" ";
cout<<endl;
return 0;
}


#include<iostream>
using namespace std;
long long int arr[100002]={0};
long long int brr[100002]={0};
long long int crr[100002]={0};
int query[100002][3];

int main()
{
long long int i,j,m,n,k,a,b,c;
cin>>n>>m>>k;

for(i=1;i<=n;i++)
cin>>arr[i];

for(i=1;i<=m;i++)
{
cin>>a>>b>>c;
query[i][0]=a;
query[i][1]=b;
query[i][2]=c;
}

for(j=1;j<=k;j++)
{
cin>>a>>b;
crr[a]+=1;
crr[b+1]=crr[b+1]-1;
}

for(i=1;i<=m;i++)
crr[i]=crr[i]+crr[i-1];

for(i=1;i<=m;i++)
{
a=query[i][0];
b=query[i][1];
c=query[i][2];
brr[a]=brr[a]+(crr[i]*c);
brr[b+1]=brr[b+1]-(crr[i]*c);
}

for(i=1;i<=n;i++)
brr[i]=brr[i-1]+brr[i];
/*
for(i=1;i<=n;i++)
cout<<crr[i]<<" ";
cout<<endl;
*/
for(i=1;i<=n;i++)
cout<<(brr[i]+arr[i])<<" ";
cout<<endl;
return 0;
}


#include<iostream>
using namespace std;
long long int arr[100002]={0};
long long int brr[100002]={0};
long long int crr[100002]={0};
int query[100002][3]={0};

int main()
{
int i,j,m,n,k,a,b,c;
cin>>n>>m>>k;

for(i=1;i<=n;i++)
cin>>arr[i];
for(i=1;i<=m;i++)
{
cin>>a>>b>>c;
query[i][0]=a;
query[i][1]=b;
query[i][2]=c;
}

for(j=1;j<=k;j++)
{
cin>>a>>b;
crr[a]+=1;
crr[b+1]=crr[b+1]-1;
}

for(i=1;i<=n;i++)
crr[i]=crr[i]+crr[i-1];

for(i=1;i<=n;i++)
{
a=query[i][0];
b=query[i][1];
c=query[i][2];
brr[a]=brr[a]+(crr[i]*c);
brr[b+1]=brr[b+1]-(crr[i]*c);
}

for(i=1;i<=n;i++)
brr[i]=brr[i-1]+brr[i];
/*
for(i=1;i<=n;i++)
cout<<crr[i]<<" ";
cout<<endl;
*/
for(i=1;i<=n;i++)
cout<<brr[i]+arr[i]<<" ";
cout<<endl;
return 0;
}


#include<iostream>
using namespace std;
long long int arr[100002]={0};
long long int brr[100002]={0};
long long int crr[100002]={0};
int query[100002][3];

int main()
{
long long int i,j,m,n,k,a,b,c;
cin>>n>>m>>k;

for(i=1;i<=n;i++)
cin>>arr[i];

for(i=1;i<=m;i++)
{
cin>>a>>b>>c;
query[i][0]=a;
query[i][1]=b;
query[i][2]=c;
}

for(j=1;j<=k;j++)
{
cin>>a>>b;
crr[a]+=1;
crr[b+1]=crr[b+1]-1;
}

for(i=1;i<=m;i++)
crr[i]=crr[i]+crr[i-1];

for(i=1;i<=n;i++)
{
a=query[i][0];
b=query[i][1];
c=query[i][2];
brr[a]=brr[a]+(crr[i]*c);
brr[b+1]=brr[b+1]-(crr[i]*c);
}

for(i=1;i<=n;i++)
brr[i]=brr[i-1]+brr[i];
/*
for(i=1;i<=n;i++)
cout<<crr[i]<<" ";
cout<<endl;
*/
for(i=1;i<=n;i++)
cout<<(brr[i]+arr[i])<<" ";
cout<<endl;
return 0;
}


#include<iostream>
using namespace std;
long long int arr[100002]={0};
long long int brr[100002]={0};
long long int crr[100002]={0};
long long int query[100002][3]={0};

int main()
{
long long int i,j,m,n,k,a,b,c;
cin>>n>>m>>k;

for(i=1;i<=n;i++)
cin>>arr[i];
for(i=1;i<=m;i++)
{
cin>>a>>b>>c;
query[i][0]=a;
query[i][1]=b;
query[i][2]=c;
}

for(j=1;j<=k;j++)
{
cin>>a>>b;
crr[a]+=1;
crr[b+1]=crr[b+1]-1;
}

for(i=1;i<=n;i++)
crr[i]=crr[i]+crr[i-1];

for(i=1;i<=n;i++)
{
a=query[i][0];
b=query[i][1];
c=query[i][2];
brr[a]=brr[a]+(crr[i]*c);
brr[b+1]=brr[b+1]-(crr[i]*c);
}

for(i=1;i<=n;i++)
brr[i]=brr[i-1]+brr[i];
/*
for(i=1;i<=n;i++)
cout<<crr[i]<<" ";
cout<<endl;
*/
for(i=1;i<=n;i++)
cout<<(long long)(brr[i]+arr[i])<<" ";
cout<<endl;
return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
#include<cstring>
using namespace std;
#define LL long long
#define maxn 100010
#define mem(x) memset(x,0,sizeof(x))
LL xl,yr,dd,ss,ans;
LL t[4*maxn];
LL a[maxn],l[maxn],y[maxn],d[maxn],r[maxn],x[maxn];
int insert(int a,int b,int wei)
{
   // cout<<"2 "<<a<<" "<<b<<" "<<wei<<endl;
   // cout<<xl<<" "<<yr<<endl;
    if(xl<=a&&b<=yr)
    t[wei]+=dd;
    else if(xl>b||yr<a)
    return 0;
    else
    {
        int mid=(a+b)/2;
        insert(a,mid,2*wei);
        insert(mid+1,b,2*wei+1);
    }
    return 1;
}
int find(int a,int b,int wei)
{
    //cout<<"1 "<<a<<" "<<b<<" "<<wei<<endl;
    if(ss<a||ss>b)
    return 0;
    else if(ss==a&&ss==b)
    ans+=t[wei];
    else
    {
        ans+=t[wei];
        int mid=(a+b)/2;
        find(a,mid,2*wei);
        find(mid+1,b,2*wei+1);

    }
    return 0;
}
int main()
{
    //freopen("test.in","r",stdin);
    int n,m,k;
    while(cin>>n>>m>>k)
    {
        for(int i=1;i<=n;i++)
        cin>>a[i];
        for(int i=1;i<=m;i++)
        cin>>l[i]>>r[i]>>d[i];
        memset(t,0,sizeof(t));
        for(int i=1;i<=k;i++)
        cin>>xl>>yr,dd=1,insert(1,m,1);
        for(int i=1;i<=m;i++)
        {
            ans=0;
            ss=i;
            find(1,n,1);
           // cout<<ans<<" ";
            d[i]=d[i]*ans;
        }
        memset(t,0,sizeof(t));
       for(int i=1;i<=m;i++)
        {
            xl=l[i];yr=r[i];
            dd=d[i];
            insert(1,n,1);
        }
        for(int i=1;i<=n;i++)
        {
            ss=i;
            ans=0;
            find(1,n,1);
            a[i]+=ans;
        }
        for(int i=1;i<=n;i++)
        cout<<a[i]<<" ";
        cout<<endl;
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
#include<cstring>
using namespace std;
#define LL long long
#define maxn 100010
#define mem(x) memset(x,0,sizeof(x))
LL xl,yr,dd,ss,ans;
LL t[4*maxn];
LL a[maxn],l[maxn],y[maxn],d[maxn],r[maxn],x[maxn];
int insert(int a,int b,int wei)
{
   // cout<<"2 "<<a<<" "<<b<<" "<<wei<<endl;
   // cout<<xl<<" "<<yr<<endl;
    if(xl<=a&&b<=yr)
    t[wei]+=dd;
    else if(xl>b||yr<a)
    return 0;
    else
    {
        int mid=(a+b)/2;
        insert(a,mid,2*wei);
        insert(mid+1,b,2*wei+1);
    }
    return 1;
}
int find(int a,int b,int wei)
{
    //cout<<"1 "<<a<<" "<<b<<" "<<wei<<endl;
    if(ss<a||ss>b)
    return 0;
    else if(ss==a&&ss==b)
    ans+=t[wei];
    else
    {
        ans+=t[wei];
        int mid=(a+b)/2;
        find(a,mid,2*wei);
        find(mid+1,b,2*wei+1);

    }
    return 0;
}
int main()
{
    //freopen("test.in","r",stdin);
    LL n,m,k;
    while(cin>>n>>m>>k)
    {
        for(int i=1;i<=n;i++)
        cin>>a[i];
        for(int i=1;i<=m;i++)
        cin>>l[i]>>r[i]>>d[i];
        memset(t,0,sizeof(t));
        for(int i=1;i<=k;i++)
        cin>>xl>>yr,dd=1,insert(1,m,1);
        for(LL i=1;i<=m;i++)
        {
            ans=0;
            ss=i;
            find(1,m,1);
           // cout<<ans<<" ";
            d[i]=d[i]*ans;
        }
        memset(t,0,sizeof(t));
       for(LL i=1;i<=m;i++)
        {
            xl=l[i];yr=r[i];
            dd=d[i];
            insert(1,n,1);
        }
        for(LL i=1;i<=n;i++)
        {
            ss=i;
            ans=0;
            find(1,n,1);
            a[i]+=ans;
        }
        for(int i=1;i<=n;i++)
        cout<<a[i]<<" ";
        cout<<endl;
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
#include<cstring>
using namespace std;
#define LL long long
#define maxn 100010
#define mem(x) memset(x,0,sizeof(x))
int xl,yr,dd,ss,ans;
LL t[4*maxn];
LL a[maxn],l[maxn],y[maxn],d[maxn],r[maxn],x[maxn];
int insert(int a,int b,int wei)
{
   // cout<<"2 "<<a<<" "<<b<<" "<<wei<<endl;
   // cout<<xl<<" "<<yr<<endl;
    if(xl<=a&&b<=yr)
    t[wei]+=dd;
    else if(xl>b||yr<a)
    return 0;
    else
    {
        int mid=(a+b)/2;
        insert(a,mid,2*wei);
        insert(mid+1,b,2*wei+1);
    }
    return 1;
}
int find(int a,int b,int wei)
{
    //cout<<"1 "<<a<<" "<<b<<" "<<wei<<endl;
    if(ss<a||ss>b)
    return 0;
    else if(ss==a&&ss==b)
    ans+=t[wei];
    else
    {
        ans+=t[wei];
        int mid=(a+b)/2;
        find(a,mid,2*wei);
        find(mid+1,b,2*wei+1);

    }
    return 0;
}
int main()
{
    freopen("test.in","r",stdin);
    int n,m,k;
    while(cin>>n>>m>>k)
    {
        for(int i=1;i<=n;i++)
        cin>>a[i];
        for(int i=1;i<=m;i++)
        cin>>l[i]>>r[i]>>d[i];
        memset(t,0,sizeof(t));
        for(int i=1;i<=k;i++)
        cin>>xl>>yr,dd=1,insert(1,m,1);
        for(int i=1;i<=m;i++)
        {
            ans=0;
            ss=i;
            find(1,n,1);
           // cout<<ans<<" ";
            d[i]=d[i]*ans;
        }
        memset(t,0,sizeof(t));
       for(int i=1;i<=m;i++)
        {
            xl=l[i];yr=r[i];
            dd=d[i];
            insert(1,n,1);
        }
        for(int i=1;i<=n;i++)
        {
            ss=i;
            ans=0;
            find(1,n,1);
            a[i]+=ans;
        }
        for(int i=1;i<=n;i++)
        cout<<a[i]<<" ";
        cout<<endl;
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
#include<cstring>
using namespace std;
#define LL long long
#define maxn 100010
#define mem(x) memset(x,0,sizeof(x))
int xl,yr,dd,ss,ans;
LL t[4*maxn];
LL a[maxn],l[maxn],y[maxn],d[maxn],r[maxn],x[maxn];
int insert(int a,int b,int wei)
{
   // cout<<"2 "<<a<<" "<<b<<" "<<wei<<endl;
   // cout<<xl<<" "<<yr<<endl;
    if(xl<=a&&b<=yr)
    t[wei]+=dd;
    else if(xl>b||yr<a)
    return 0;
    else
    {
        int mid=(a+b)/2;
        insert(a,mid,2*wei);
        insert(mid+1,b,2*wei+1);
    }
    return 1;
}
int find(int a,int b,int wei)
{
    //cout<<"1 "<<a<<" "<<b<<" "<<wei<<endl;
    if(ss<a||ss>b)
    return 0;
    else if(ss==a&&ss==b)
    ans+=t[wei];
    else
    {
        ans+=t[wei];
        int mid=(a+b)/2;
        find(a,mid,2*wei);
        find(mid+1,b,2*wei+1);

    }
    return 0;
}
int main()
{
    //freopen("test.in","r",stdin);
    int n,m,k;
    while(cin>>n>>m>>k)
    {
        for(int i=1;i<=n;i++)
        cin>>a[i];
        for(int i=1;i<=m;i++)
        cin>>l[i]>>r[i]>>d[i];
        memset(t,0,sizeof(t));
        for(int i=1;i<=k;i++)
        cin>>xl>>yr,dd=1,insert(1,m,1);
        for(int i=1;i<=m;i++)
        {
            ans=0;
            ss=i;
            find(1,n,1);
           // cout<<ans<<" ";
            d[i]=d[i]*ans;
        }
        memset(t,0,sizeof(t));
       for(int i=1;i<=m;i++)
        {
            xl=l[i];yr=r[i];
            dd=d[i];
            insert(1,n,1);
        }
        for(int i=1;i<=n;i++)
        {
            ss=i;
            ans=0;
            find(1,n,1);
            a[i]+=ans;
        }
        for(int i=1;i<=n;i++)
        cout<<a[i]<<" ";
        cout<<endl;
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
#define LL long long
#define maxn 100100
LL a[maxn],l[maxn],y[maxn],d[maxn],r[maxn],x[maxn];
int main()
{
    //freopen("test.in","r",stdin);
    LL n,m,k;
    while(cin>>n>>m>>k)
    {
        for(int i=1;i<=n;i++)
        cin>>a[i];
        for(int i=1;i<=m;i++)
        cin>>l[i]>>r[i]>>d[i];
        LL t[maxn];
        memset(t,0,sizeof(t));
        for(int i=1;i<=k;i++)
        cin>>x[i]>>y[i],t[x[i]]++,t[y[i]+1]--;
        LL sum=0;
        for(int i=1;i<=m;i++)
        {
            sum+=t[i];
            d[i]*=sum;
        }
        sum=0;
        memset(t,0,sizeof(t));
        for(int i=1;i<=m;i++)
        {
            t[l[i]]+=d[i];
            t[r[i]+1]-=d[i];
        }
        for(int i=1;i<=n;i++)
        {
            sum+=t[i];
            a[i]+=sum;
            cout<<a[i]<<" ";
        }
        cout<<endl;
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
#define LL long long
#define maxn 100100
LL a[maxn],l[maxn],y[maxn],d[maxn],r[maxn],x[maxn];
int main()
{
    //freopen("test.in","r",stdin);
    LL n,m,k;
    while(cin>>n>>m>>k)
    {
        for(int i=1;i<=n;i++)
        cin>>a[i];
        for(int i=1;i<=m;i++)
        cin>>l[i]>>r[i]>>d[i];
        int t[maxn];
        memset(t,0,sizeof(t));
        for(int i=1;i<=k;i++)
        cin>>x[i]>>y[i],t[x[i]]++,t[y[i]+1]--;
        int sum=0;
        for(int i=1;i<=m;i++)
        {
            sum+=t[i];
            d[i]*=sum;
        }
        sum=0;
        memset(t,0,sizeof(t));
        for(int i=1;i<=m;i++)
        {
            t[l[i]]+=d[i];
            t[r[i]+1]-=d[i];
        }
        for(int i=1;i<=n;i++)
        {
            sum+=t[i];
            a[i]+=sum;
            cout<<a[i]<<" ";
        }
        cout<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int>ii;
typedef vector<int>vi;
typedef vector<ll>vl;
#define max_n 100008
class segtree{
private :vl st,a;
int n;
int left(int p){return p<<1;}
int right (int p){return (p<<1)+1;}
void update(ll p,ll l,ll r,ll x,ll y,ll val){
    if(l>y||r<x)return;
    if (l>=x&&r<=y){st[p]+=(r-l+1)*val;return ;}
    ll sum=st[left(p)]+st[right(p)];
    if(sum<st[p]){
        ll div=(st[p]-sum)/(r-l+1);
        st[left(p)]+=((r+l)/2-l+1)*div;
        st[right(p)]+=((r)-((l+r)/2+1)+1)*div;
    }
    update(left(p),l,(l+r)/2,x,y,val);
    update(right(p),(l+r)/2+1,r,x,y,val);
    st[p]=st[left(p)]+st[right(p)];
 }
ll find (int p,int l,int r,int id){
    if(l>id||r<id)return -1;
    if(l==r&&r==id)return st[p];
    return (find(left(p),l,(l+r)/2,id)!=-1?find(left(p),l,(l+r)/2,id):find(right(p),(l+r)/2+1,r,id));
}
public:
    segtree(int sz){
        n=sz;
        st.assign(4*n,0);
    }
    void update(ll x,ll y,ll val){
        update(1,0,n-1,x,y,val);
    }
    ll find(ll i){
        ll ret=find(1,0,n-1,i);
    }
};

ll all[max_n];
ll st[max_n],nd[max_n],d[max_n];
int main(){
//    freopen("in.in","rt",stdin);
    int n,m,k;
    cin>>n>>m>>k;
    for(int i=0;i<n;i++){scanf("%lld",&all[i]);}
    segtree arr(n);
    segtree q(m);
    for(int i=0;i<m;i++){scanf("%lld%lld%lld",&st[i],&nd[i],&d[i]);st[i]--,nd[i]--;}
    for(int i=0;i<k;i++){
        ll x,y;
        scanf("%lld%lld%",&x,&y);
        x--,y--;
        q.update(x,y,1);
    }
    for(int i=0;i<m;i++)q.update(i,i,0);
    for(int i=0;i<m;i++){
        arr.update(st[i],nd[i],d[i]*q.find(i));
    }
    for(int i=0;i<n;i++)arr.update(i,i,0);
    for(int i=0;i<n;i++)cout<<all[i]+arr.find(i)<<" ";
    cout<<endl;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int>ii;
typedef vector<int>vi;
typedef vector<ll>vl;
#define max_n 100008
class segtree{
private :vl st,a;
int n;
int left(int p){return p<<1;}
int right (int p){return (p<<1)+1;}
void update(ll p,ll l,ll r,ll x,ll y,ll val){
    if(l>y||r<x)return;
    if (l>=x&&r<=y){st[p]+=(r-l+1)*val;return ;}
    ll sum=st[left(p)]+st[right(p)];
    if(sum<st[p]){
        ll div=(st[p]-sum)/(r-l+1);
        st[left(p)]+=((r+l)/2-l+1)*div;
        st[right(p)]+=((r)-((l+r)/2+1)+1)*div;
    }
    update(left(p),l,(l+r)/2,x,y,val);
    update(right(p),(l+r)/2+1,r,x,y,val);
    st[p]=st[left(p)]+st[right(p)];
 }
ll find (int p,int l,int r,int id){
    if(l>id||r<id)return -1;
    if(l==r&&r==id)return st[p];
    return (find(left(p),l,(l+r)/2,id)!=-1?find(left(p),l,(l+r)/2,id):find(right(p),(l+r)/2+1,r,id));
}
public:
    segtree(int sz){
        n=sz;
        st.assign(4*n,0);
    }
    void update(ll x,ll y,ll val){
        update(1,0,n-1,x,y,val);
    }
    ll find(ll i){
        ll ret=find(1,0,n-1,i);
    }
};

ll all[max_n];
ll st[max_n],nd[max_n],d[max_n];
int main(){
//    freopen("in.in","rt",stdin);
    int n,m,k;
    cin>>n>>m>>k;
    for(int i=0;i<n;i++){scanf("%lld",&all[i]);}
    segtree arr(n);
    segtree q(m);
    for(int i=0;i<m;i++){scanf("%lld%lld%lld",&st[i],&nd[i],&d[i]);st[i]--,nd[i]--;}
    for(int i=0;i<k;i++){
        ll x,y;
        scanf("%lld%lld%",&x,&y);
        x--,y--;
        q.update(x,y,1);
    }
    for(int i=0;i<m;i++)q.update(i,i,0);
    for(int i=0;i<m;i++){
        arr.update(st[i],nd[i],d[i]*q.find(i));
    }
    for(int i=0;i<n;i++)arr.update(i,i,0);
    for(int i=0;i<n;i++)printf("%lld ",all[i]+arr.find(i));
    cout<<endl;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int>ii;
typedef vector<int>vi;
typedef vector<ll>vl;
#define max_n 100008
class segtree{
private :vl st,a;
int n;
int left(int p){return p<<1;}
int right (int p){return (p<<1)+1;}
void update(ll p,ll l,ll r,ll x,ll y,ll val){
    if(l>y||r<x)return;
    if (l>=x&&r<=y){st[p]+=(r-l+1)*val;return ;}
    ll sum=st[left(p)]+st[right(p)];
    if(sum<st[p]){
        ll div=(st[p]-sum)/(r-l+1);
        st[left(p)]+=((r+l)/2-l+1)*div;
        st[right(p)]+=((r)-((l+r)/2+1)+1)*div;
    }
    update(left(p),l,(l+r)/2,x,y,val);
    update(right(p),(l+r)/2+1,r,x,y,val);
    st[p]=st[left(p)]+st[right(p)];
 }
ll find (int p,int l,int r,int id){
    if(l>id||r<id)return -1;
    if(l==r&&r==id)return st[p];
    return (find(left(p),l,(l+r)/2,id)!=-1?find(left(p),l,(l+r)/2,id):find(right(p),(l+r)/2+1,r,id));
}
public:
    segtree(int sz){
        n=sz;
        st.assign(4*n,0);
    }
    void update(ll x,ll y,ll val){
        update(1,0,n-1,x,y,val);
    }
    ll find(ll i){
        ll ret=find(1,0,n-1,i);
    }
};

ll all[max_n];
ll st[max_n],nd[max_n],d[max_n];
int main(){ios::sync_with_stdio(0);
//    freopen("in.in","rt",stdin);
    int n,m,k;
    cin>>n>>m>>k;
    for(int i=0;i<n;i++){cin>>all[i];}
    segtree arr(n);
    segtree q(m);
    for(int i=0;i<m;i++){cin>>st[i]>>nd[i]>>d[i];st[i]--,nd[i]--;}
    for(int i=0;i<k;i++){
        ll x,y;
        cin>>x>>y;
        x--,y--;
        q.update(x,y,1);
    }
    for(int i=0;i<m;i++)q.update(i,i,0);
    for(int i=0;i<m;i++){
        arr.update(st[i],nd[i],d[i]*q.find(i));
    }
    for(int i=0;i<n;i++)arr.update(i,i,0);
    for(int i=0;i<n;i++)cout<<all[i]+arr.find(i)<<" ";
    cout<<endl;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int>ii;
typedef vector<int>vi;
typedef vector<ll>vl;
#define max_n 100008

class segtree{
private :vl st,a;
int n;
int left(int p){return p<<1;}
int right (int p){return (p<<1)+1;}
void uppp(int p,int l,int r,int x,int y,ll val){
    if(l>y||r<x)return;
    if (l>=x&&r<=y){st[p]+=(r-l+1)*val;return ;}
    ll sum=st[left(p)]+st[right(p)];
    if(sum<st[p]){
        ll div=(st[p]-sum)/(r-l+1);
        st[left(p)]+=(((r+l)/2)-l+1)*div;
        st[right(p)]+=((r)-((l+r)/2))*div;
    }
    uppp(left(p),l,(l+r)/2,x,y,val);
    uppp(right(p),(l+r)/2+1,r,x,y,val);
    st[p]=st[left(p)]+st[right(p)];
 }

public:
    segtree(int sz){
        n=sz;
        st.assign(4*n,0);
    }
    ll fnd (int p,int l,int r,int id){
    if(l>id||r<id)return -1;
    if(l==r&&r==id)return st[p];
    return (fnd(left(p),l,(l+r)/2,id)!=-1?fnd(left(p),l,(l+r)/2,id):fnd(right(p),(l+r)/2+1,r,id));
}
    void uppp(int x,int y,ll val){
        uppp(1,0,n-1,x,y,val);
    }
};
ll all[max_n];
int sta[max_n],nd[max_n],d[max_n];

int main(){
    ios::sync_with_stdio(0);
//    freopen("in.in","rt",stdin);
    int n,m,k;
    cin>>n>>m>>k;
//    scanf("%d%d%d",&n,&m,&k);
    for(int i=0;i<n;i++){
        cin>>all[i];
//        scanf("%lld",&all[i]);
    }
    segtree arr(n);
    segtree q(m);
    for(int i=0;i<m;i++){
        cin>>sta[i]>>nd[i]>>d[i];
        //scanf("%d%d%d",&sta[i],&nd[i],&d[i]);
        sta[i]--,nd[i]--;
    }
    for(int i=0;i<k;i++){
        int x,y;
        cin>>x>>y;
//        scanf("%d%d",&x,&y);
        x--,y--;
        q.uppp(x,y,1);
    }
    for(int i=0;i<m;i++)q.uppp(i,i,0);
    for(int i=0;i<m;i++){
        arr.uppp(sta[i],nd[i],d[i]*q.fnd(1,0,m-1,i));
    }
    for(int i=0;i<n;i++)arr.uppp(i,i,0);
    for(int i=0;i<n;i++)all[i]+=arr.fnd(1,0,n-1,i);
    for(int i=0;i<n;i++)
        cout<<all[i]<<" ";
//        printf("%lld ",all[i]);

}


#include <bits/stdc++.h>
using namespace std;
#define max_n 100008
typedef long long ll;
ll all[max_n];
ll rep_arr[max_n];
int rep_q[max_n];
int st[max_n],nd[max_n],d[max_n];
int main(){
//    freopen("in.in","rt",stdin);
    int n,m,k;
    cin>>n>>m>>k;
    for(int i=0;i<n;i++)cin>>all[i];
    for(int i=0;i<m;i++){cin>>st[i]>>nd[i]>>d[i];st[i]--;nd[i]--;}
    memset(rep_q,0,sizeof(rep_q));
    for(int i=0;i<k;i++){
        int x,y;
        cin>>x>>y;
        x--;y--;
        rep_q[x]+=1;
        rep_q[y+1]-=1;
    }
    ll sum=0;
    for(int i=0;i<m;i++){
        int x=rep_q[i];
        rep_q[i]+=sum;
        sum+=x;
    }
    memset(rep_arr,0,sizeof(rep_arr));
    sum=0;
    for(int i=0;i<m;i++){
        int rep=rep_q[i];
        rep_arr[st[i]]+=d[i]*rep;
        rep_arr[nd[i]+1]-=d[i]*rep;
    }
    for(int i=0;i<n;i++){
         ll x=rep_arr[i];
        rep_arr[i]+=sum;
        sum+=x;
    }
    for(int i=0;i<n;i++)all[i]+=rep_arr[i];
    for(int i=0;i<n;i++)cout<<all[i]<<" ";
}


#include <bits/stdc++.h>
using namespace std;
#define max_n 100010
typedef long long ll;
ll all[max_n];
ll rep_arr[max_n];
ll rep_q[max_n];
ll st[max_n],nd[max_n],d[max_n];
int main(){
   // freopen("in.in","rt",stdin);
    ll n,m,k;
    cin>>n>>m>>k;
    for(ll i=0;i<n;i++)cin>>all[i];
    for(ll i=0;i<m;i++){cin>>st[i]>>nd[i]>>d[i];st[i]--;nd[i]--;}
    memset(rep_q,0,sizeof(rep_q));
    for(ll i=0;i<k;i++){
        ll x,y;
        cin>>x>>y;
        x--;y--;
        rep_q[x]+=1;
        rep_q[y+1]-=1;
    }
    ll sum=0;
    for(ll i=0;i<m;i++){
        ll x=rep_q[i];
        rep_q[i]+=sum;
        sum+=x;
    }
    memset(rep_arr,0,sizeof(rep_arr));
    sum=0;
    for(ll i=0;i<m;i++){
        ll rep=rep_q[i];
        rep_arr[st[i]]+=d[i]*rep;
        rep_arr[nd[i]+1]-=d[i]*rep;
    }
    for(ll i=0;i<n;i++){
         ll x=rep_arr[i];
        rep_arr[i]+=sum;
        sum+=x;
    }
    for(ll i=0;i<n;i++)all[i]+=rep_arr[i];
    for(ll i=0;i<n;i++)cout<<all[i]<<" ";
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#include <cstdlib>
#include <utility>
#include<iostream>
#include <iterator>
#include <set>
typedef long long ll;
#define fi first
#define se second
#define PB(a) push_back(a);
#define INF = 1000000000;
#define REP(i,n) for (int i = 0; i < n; i++)
#define REPI(i,n) for (int i = 1; i <= n; i++)
#define REPN(i,n) for (int i = n-1; i >= 0; i--)
#define REPF(j,i,n) for (int j = i; j < n; j++)
#define LL long long
#define PI pair<int,int>
#define PL pair<long,long>
#define vi vector<int>
#define MAXN 100005
//int gcd(int a,int b){ return b == 0 ? a : gcd(b,a%b);}
//int lcm(int a,int b){ return a * (b/gcd(a,b)); }

using namespace std;

int n,m,k;
int ar[MAXN];

struct q{
	int l,r,d;
};

LL tree[4*MAXN];
LL lazy[4*MAXN];

q query[100005];
LL tree2[4*MAXN];
LL lazy2[4*MAXN];
LL ar2[MAXN];
void build(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree[node] = ar[l];
		return;
	}

	build(node*2+1,l,(l+r)/2);
	build(node*2+2,(l+r)/2+1,r);

	tree[node] = tree[node*2+1] + tree[node*2+2];

}

void build2(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree2[node] = ar2[l];
		return;
	}

	build2(node*2+1,l,(l+r)/2);
	build2(node*2+2,(l+r)/2+1,r);

	tree2[node] = tree2[node*2+1] + tree2[node*2+2];

}

void update2(int node,int l,int r,int x,int y){
	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree2[node] += 1;
		if(l != r){
			lazy2[node*2+1] += 1;
			lazy2[node*2+2] += 1;
		}
		return;
	}
	update2(node*2+1,l,(l+r)/2,x,y);
	update2(node*2+2,(l+r)/2+1,r,x,y);
	tree2[node] = tree2[node*2+1] + tree2[node*2+2];
}

void update(int node,int l,int r,int x,int y,LL value){
	if(lazy[node] != 0){
		tree[node] += lazy[node];
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree[node] += value;
		if(l != r){
			lazy[node*2+1] += value;
			lazy[node*2+2] += value;
		}
		return;
	}
	update(node*2+1,l,(l+r)/2,x,y,value);
	update(node*2+2,(l+r)/2+1,r,x,y,value);
	tree[node] = tree[node*2+1] + tree[node*2+2];
}

LL query2(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] = lazy2[node];
			lazy2[node*2+2] = lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node]	;
	}

	LL q1 = query2(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query2(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL query3(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy[node] != 0){
		tree[node] += lazy[node];
		if(l != r){
			lazy[node*2+1] = lazy[node];
			lazy[node*2+2] = lazy[node];
		}
		lazy[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree[node]	;
	}

	LL q1 = query3(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query3(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL qq(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] = lazy2[node];
			lazy2[node*2+2] = lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node];
	}

	LL q1 = qq(node*2+1,l,(l+r)/2,x,y);
	LL q2 = qq(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

int main (){
	memset(lazy,0,sizeof(lazy));
	memset(ar2,0,sizeof(ar2));
	memset(lazy2,0,sizeof(lazy2));
	scanf("%d%d%d",&n,&m,&k);

	for(int i=0;i<n;i++){
		scanf("%d",&ar[i]);
	}
	build(1,0,n-1);
	for(int i=1;i<=m;i++){
		scanf("%d%d%d",&query[i].l,&query[i].r,&query[i].d);
	}

	for(int i=0;i<k;i++){
		int t1,t2;
		scanf("%d%d",&t1,&t2);
		update2(1,0,n-1,t1-1,t2-1);
	}

	for(int i=1;i<=m;i++){
		LL results = qq(1,0,n-1,i-1,i-1);
		LL batas_kiri = query[i].l;
		LL batas_kanan = query[i].r;
		LL tambah = query[i].d;
//		cout << "Batas Kiri : " << batas_kiri << endl;
//		cout << "Batas Kanan: " << batas_kanan << endl;
//		cout << "Tambah     : " << tambah << endl;
//		cout << "Result     : " << results << endl << endl;
		update(1,0,n-1,batas_kiri-1,batas_kanan-1,tambah*results);
	}

	for(int i=0;i<n;i++){
		printf("%I64d ",query3(1,0,n-1,i,i));
	}

	return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#include <cstdlib>
#include <utility>
#include<iostream>
#include <iterator>
#include <set>
typedef long long ll;
#define fi first
#define se second
#define PB(a) push_back(a);
#define INF = 1000000000;
#define REP(i,n) for (int i = 0; i < n; i++)
#define REPI(i,n) for (int i = 1; i <= n; i++)
#define REPN(i,n) for (int i = n-1; i >= 0; i--)
#define REPF(j,i,n) for (int j = i; j < n; j++)
#define LL long long
#define PI pair<int,int>
#define PL pair<long,long>
#define vi vector<int>
#define MAXN 100005
//int gcd(int a,int b){ return b == 0 ? a : gcd(b,a%b);}
//int lcm(int a,int b){ return a * (b/gcd(a,b)); }

using namespace std;

int n,m,k;
int ar[MAXN];

struct q{
	int l,r,d;
};

LL tree[4*MAXN];
LL lazy[4*MAXN];

q query[100005];
LL tree2[4*MAXN];
LL lazy2[4*MAXN];
LL ar2[MAXN];
void build(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree[node] = ar[l];
		return;
	}

	build(node*2+1,l,(l+r)/2);
	build(node*2+2,(l+r)/2+1,r);

	tree[node] = tree[node*2+1] + tree[node*2+2];

}

void build2(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree2[node] = ar2[l];
		return;
	}

	build2(node*2+1,l,(l+r)/2);
	build2(node*2+2,(l+r)/2+1,r);

	tree2[node] = tree2[node*2+1] + tree2[node*2+2];

}

void update2(int node,int l,int r,int x,int y){
	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree2[node] += 1;
		if(l != r){
			lazy2[node*2+1] += 1;
			lazy2[node*2+2] += 1;
		}
		return;
	}
	update2(node*2+1,l,(l+r)/2,x,y);
	update2(node*2+2,(l+r)/2+1,r,x,y);
	tree2[node] = tree2[node*2+1] + tree2[node*2+2];
}

void update(int node,int l,int r,int x,int y,LL value){
	if(lazy[node] != 0){
		tree[node] += lazy[node];
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree[node] += value;
		if(l != r){
			lazy[node*2+1] += value;
			lazy[node*2+2] += value;
		}
		return;
	}
	update(node*2+1,l,(l+r)/2,x,y,value);
	update(node*2+2,(l+r)/2+1,r,x,y,value);
	tree[node] = tree[node*2+1] + tree[node*2+2];
}

LL query2(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node]	;
	}

	LL q1 = query2(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query2(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL query3(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy[node] != 0){
		tree[node] += lazy[node];
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree[node]	;
	}

	LL q1 = query3(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query3(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL qq(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node];
	}

	LL q1 = qq(node*2+1,l,(l+r)/2,x,y);
	LL q2 = qq(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

int main (){
	memset(lazy,0,sizeof(lazy));
	memset(ar2,0,sizeof(ar2));
	memset(lazy2,0,sizeof(lazy2));
	scanf("%d%d%d",&n,&m,&k);

	for(int i=0;i<n;i++){
		scanf("%d",&ar[i]);
	}
	build(1,0,n-1);
	for(int i=1;i<=m;i++){
		scanf("%d%d%d",&query[i].l,&query[i].r,&query[i].d);
	}

	for(int i=0;i<k;i++){
		int t1,t2;
		scanf("%d%d",&t1,&t2);
		update2(1,0,n-1,t1-1,t2-1);
	}

	for(int i=1;i<=m;i++){
		LL results = qq(1,0,n-1,i-1,i-1);
		LL batas_kiri = query[i].l;
		LL batas_kanan = query[i].r;
		LL tambah = query[i].d;
//		cout << "Batas Kiri : " << batas_kiri << endl;
//		cout << "Batas Kanan: " << batas_kanan << endl;
//		cout << "Tambah     : " << tambah << endl;
//		cout << "Result     : " << results << endl << endl;
		update(1,0,n-1,batas_kiri-1,batas_kanan-1,tambah*results);
	}

	for(int i=0;i<n;i++){
		printf("%I64d ",query3(1,0,n-1,i,i));
	}

	return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#include <cstdlib>
#include <utility>
#include<iostream>
#include <iterator>
#include <set>
typedef long long ll;
#define fi first
#define se second
#define PB(a) push_back(a);
#define INF = 1000000000;
#define REP(i,n) for (int i = 0; i < n; i++)
#define REPI(i,n) for (int i = 1; i <= n; i++)
#define REPN(i,n) for (int i = n-1; i >= 0; i--)
#define REPF(j,i,n) for (int j = i; j < n; j++)
#define LL long long
#define PI pair<int,int>
#define PL pair<long,long>
#define vi vector<int>
#define MAXN 100005
//int gcd(int a,int b){ return b == 0 ? a : gcd(b,a%b);}
//int lcm(int a,int b){ return a * (b/gcd(a,b)); }

using namespace std;

int n,m,k;
int ar[MAXN];

struct q{
	int l,r,d;
};

LL tree[4*MAXN];
LL lazy[4*MAXN];

q query[100005];
LL tree2[4*MAXN];
LL lazy2[4*MAXN];
LL ar2[MAXN];
void build(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree[node] = ar[l];
		return;
	}

	build(node*2+1,l,(l+r)/2);
	build(node*2+2,(l+r)/2+1,r);

	tree[node] = tree[node*2+1] + tree[node*2+2];

}

void build2(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree2[node] = ar2[l];
		return;
	}

	build2(node*2+1,l,(l+r)/2);
	build2(node*2+2,(l+r)/2+1,r);

	tree2[node] = tree2[node*2+1] + tree2[node*2+2];

}

void update2(int node,int l,int r,int x,int y){
	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree2[node] += 1;
		if(l != r){
			lazy2[node*2+1] += 1;
			lazy2[node*2+2] += 1;
		}
		return;
	}
	update2(node*2+1,l,(l+r)/2,x,y);
	update2(node*2+2,(l+r)/2+1,r,x,y);
	tree2[node] = tree2[node*2+1] + tree2[node*2+2];
}

void update(int node,int l,int r,int x,int y,LL value){
	if(lazy[node] != 0){
		tree[node] += lazy[node];
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree[node] += value;
		if(l != r){
			lazy[node*2+1] += value;
			lazy[node*2+2] += value;
		}
		return;
	}
	update(node*2+1,l,(l+r)/2,x,y,value);
	update(node*2+2,(l+r)/2+1,r,x,y,value);
	tree[node] = tree[node*2+1] + tree[node*2+2];
}

LL query2(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node]	;
	}

	LL q1 = query2(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query2(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL query3(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy[node] != 0){
		tree[node] += lazy[node];
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree[node]	;
	}

	LL q1 = query3(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query3(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL qq(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node];
	}

	LL q1 = qq(node*2+1,l,(l+r)/2,x,y);
	LL q2 = qq(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

int main (){
	memset(lazy,0,sizeof(lazy));
	memset(ar2,0,sizeof(ar2));
	memset(lazy2,0,sizeof(lazy2));
	scanf("%d%d%d",&n,&m,&k);

	for(int i=0;i<n;i++){
		scanf("%d",&ar[i]);
	}
	build(0,0,n-1);
	for(int i=1;i<=m;i++){
		scanf("%d%d%d",&query[i].l,&query[i].r,&query[i].d);
	}

	for(int i=0;i<k;i++){
		int t1,t2;
		scanf("%d%d",&t1,&t2);
		update2(0,0,n-1,t1-1,t2-1);
	}

	for(int i=1;i<=m;i++){
		LL results = qq(0,0,n-1,i-1,i-1);
		LL batas_kiri = query[i].l;
		LL batas_kanan = query[i].r;
		LL tambah = query[i].d;
//		cout << "Batas Kiri : " << batas_kiri << endl;
//		cout << "Batas Kanan: " << batas_kanan << endl;
//		cout << "Tambah     : " << tambah << endl;
//		cout << "Result     : " << results << endl << endl;
		update(0,0,n-1,batas_kiri-1,batas_kanan-1,tambah*results);
	}

	for(int i=0;i<n;i++){
		printf("%I64d ",query3(0,0,n-1,i,i));
	}

	return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#include <cstdlib>
#include <utility>
#include<iostream>
#include <iterator>
#include <set>
typedef long long ll;
#define fi first
#define se second
#define PB(a) push_back(a);
#define INF = 1000000000;
#define REP(i,n) for (int i = 0; i < n; i++)
#define REPI(i,n) for (int i = 1; i <= n; i++)
#define REPN(i,n) for (int i = n-1; i >= 0; i--)
#define REPF(j,i,n) for (int j = i; j < n; j++)
#define LL long long
#define PI pair<int,int>
#define PL pair<long,long>
#define vi vector<int>
#define MAXN 100100
//int gcd(int a,int b){ return b == 0 ? a : gcd(b,a%b);}
//int lcm(int a,int b){ return a * (b/gcd(a,b)); }

using namespace std;

LL n,m,k;
LL ar[MAXN];

struct q{
	LL l,r,d;
};

LL tree[8*MAXN];
LL lazy[8*MAXN];

q query[MAXN];
LL tree2[8*MAXN];
LL lazy2[8*MAXN];
LL ar2[MAXN];
void build(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree[node] = ar[l];
		return;
	}

	build(node*2+1,l,(l+r)/2);
	build(node*2+2,(l+r)/2+1,r);

	tree[node] = tree[node*2+1] + tree[node*2+2];

}

void build2(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree2[node] = ar2[l];
		return;
	}

	build2(node*2+1,l,(l+r)/2);
	build2(node*2+2,(l+r)/2+1,r);

	tree2[node] = tree2[node*2+1] + tree2[node*2+2];

}

void update2(int node,int l,int r,int x,int y){
	if(lazy2[node] != 0){
		tree2[node] += lazy2[node]  * (r-l+1);
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree2[node] += 1  * (r-l+1);
		if(l != r){
			lazy2[node*2+1] += 1;
			lazy2[node*2+2] += 1;
		}
		return;
	}
	update2(node*2+1,l,(l+r)/2,x,y);
	update2(node*2+2,(l+r)/2+1,r,x,y);
	tree2[node] = tree2[node*2+1] + tree2[node*2+2];
}

void update(int node,int l,int r,int x,int y,LL value){
	if(lazy[node] != 0){
		tree[node] += lazy[node]  * (LL)(r-l+1);
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree[node] += value * (LL)(r-l+1);
		if(l != r){
			lazy[node*2+1] += value;
			lazy[node*2+2] += value;
		}
		return;
	}
	update(node*2+1,l,(l+r)/2,x,y,value);
	update(node*2+2,(l+r)/2+1,r,x,y,value);
	tree[node] = tree[node*2+1] + tree[node*2+2];
}

LL query3(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy[node] != 0){
		tree[node] += lazy[node]  * (r-l+1);
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree[node]	;
	}

	LL q1 = query3(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query3(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL qq(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node]  * (r-l+1);
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node];
	}

	LL q1 = qq(node*2+1,l,(l+r)/2,x,y);
	LL q2 = qq(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

int main (){
	memset(lazy,0,sizeof(lazy));
	memset(ar2,0,sizeof(ar2));
	memset(lazy2,0,sizeof(lazy2));
	scanf("%I64d%I64d%I64d",&n,&m,&k);

	for(int i=0;i<n;i++){
		scanf("%I64d",&ar[i]);
	}
	build(0,0,n-1);
	for(int i=1;i<=m;i++){
		scanf("%I64d%I64d%I64d",&query[i].l,&query[i].r,&query[i].d);
	}

	for(int i=0;i<k;i++){
		LL t1,t2;
		scanf("%I64d%I64d",&t1,&t2);
		update2(0,0,m-1,t1-1,t2-1);
	}

	for(int i=1;i<=m;i++){
		LL results = qq(0,0,m-1,i-1,i-1);
		LL batas_kiri = query[i].l;
		LL batas_kanan = query[i].r;
		LL tambah = query[i].d;
//		cout << "Batas Kiri : " << batas_kiri << endl;
//		cout << "Batas Kanan: " << batas_kanan << endl;
//		cout << "Tambah     : " << tambah << endl;
//		cout << "Result     : " << results << endl << endl;
		update(0,0,n-1,batas_kiri-1,batas_kanan-1,tambah*results);
	}

	for(int i=1;i<=n;i++){
		printf("%I64d ",query3(0,0,n-1,i-1,i-1));
	}

	return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#include <cstdlib>
#include <utility>
#include<iostream>
#include <iterator>
#include <set>
typedef long long ll;
#define fi first
#define se second
#define PB(a) push_back(a);
#define INF = 1000000000;
#define REP(i,n) for (int i = 0; i < n; i++)
#define REPI(i,n) for (int i = 1; i <= n; i++)
#define REPN(i,n) for (int i = n-1; i >= 0; i--)
#define REPF(j,i,n) for (int j = i; j < n; j++)
#define LL long long
#define PI pair<int,int>
#define PL pair<long,long>
#define vi vector<int>
#define MAXN 100005
//int gcd(int a,int b){ return b == 0 ? a : gcd(b,a%b);}
//int lcm(int a,int b){ return a * (b/gcd(a,b)); }

using namespace std;

int n,m,k;
int ar[MAXN];

struct q{
	int l,r,d;
};

LL tree[4*MAXN];
LL lazy[4*MAXN];

q query[100005];
LL tree2[4*MAXN];
LL lazy2[4*MAXN];
LL ar2[MAXN];
void build(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree[node] = ar[l];
		return;
	}

	build(node*2+1,l,(l+r)/2);
	build(node*2+2,(l+r)/2+1,r);

	tree[node] = tree[node*2+1] + tree[node*2+2];

}

void build2(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree2[node] = ar2[l];
		return;
	}

	build2(node*2+1,l,(l+r)/2);
	build2(node*2+2,(l+r)/2+1,r);

	tree2[node] = tree2[node*2+1] + tree2[node*2+2];

}

void update2(int node,int l,int r,int x,int y){
	if(lazy2[node] != 0){
		tree2[node] += lazy2[node]  * (r-l+1);
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree2[node] += 1  * (r-l+1);
		if(l != r){
			lazy2[node*2+1] += 1;
			lazy2[node*2+2] += 1;
		}
		return;
	}
	update2(node*2+1,l,(l+r)/2,x,y);
	update2(node*2+2,(l+r)/2+1,r,x,y);
	tree2[node] = tree2[node*2+1] + tree2[node*2+2];
}

void update(int node,int l,int r,int x,int y,LL value){
	if(lazy[node] != 0){
		tree[node] += lazy[node]  * (r-l+1);
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree[node] += value * (r-l+1);
		if(l != r){
			lazy[node*2+1] += value;
			lazy[node*2+2] += value;
		}
		return;
	}
	update(node*2+1,l,(l+r)/2,x,y,value);
	update(node*2+2,(l+r)/2+1,r,x,y,value);
	tree[node] = tree[node*2+1] + tree[node*2+2];
}

LL query3(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy[node] != 0){
		tree[node] += lazy[node]  * (r-l+1);
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree[node]	;
	}

	LL q1 = query3(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query3(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL qq(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node]  * (r-l+1);
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node];
	}

	LL q1 = qq(node*2+1,l,(l+r)/2,x,y);
	LL q2 = qq(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

int main (){
	memset(lazy,0,sizeof(lazy));
	memset(ar2,0,sizeof(ar2));
	memset(lazy2,0,sizeof(lazy2));
	scanf("%d%d%d",&n,&m,&k);

	for(int i=0;i<n;i++){
		scanf("%d",&ar[i]);
	}
	build(0,0,n-1);
	for(int i=1;i<=m;i++){
		scanf("%d%d%d",&query[i].l,&query[i].r,&query[i].d);
	}

	for(int i=0;i<k;i++){
		int t1,t2;
		scanf("%d%d",&t1,&t2);
		update2(0,0,n-1,t1-1,t2-1);
	}

	for(int i=1;i<=m;i++){
		LL results = qq(0,0,n-1,i-1,i-1);
		LL batas_kiri = query[i].l;
		LL batas_kanan = query[i].r;
		LL tambah = query[i].d;
//		cout << "Batas Kiri : " << batas_kiri << endl;
//		cout << "Batas Kanan: " << batas_kanan << endl;
//		cout << "Tambah     : " << tambah << endl;
//		cout << "Result     : " << results << endl << endl;
		update(0,0,n-1,batas_kiri-1,batas_kanan-1,tambah*results);
	}

	for(int i=0;i<n;i++){
		printf("%I64d ",query3(0,0,n-1,i,i));
	}

	return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#include <cstdlib>
#include <utility>
#include<iostream>
#include <iterator>
#include <set>
typedef long long ll;
#define fi first
#define se second
#define PB(a) push_back(a);
#define INF = 1000000000;
#define REP(i,n) for (int i = 0; i < n; i++)
#define REPI(i,n) for (int i = 1; i <= n; i++)
#define REPN(i,n) for (int i = n-1; i >= 0; i--)
#define REPF(j,i,n) for (int j = i; j < n; j++)
#define LL long long
#define PI pair<int,int>
#define PL pair<long,long>
#define vi vector<int>
#define MAXN 100005
//int gcd(int a,int b){ return b == 0 ? a : gcd(b,a%b);}
//int lcm(int a,int b){ return a * (b/gcd(a,b)); }

using namespace std;

int n,m,k;
int ar[MAXN];

struct q{
	int l,r,d;
};

int tree[4*MAXN];
int lazy[4*MAXN];

q query[100005];
LL tree2[4*MAXN];
LL lazy2[4*MAXN];
LL ar2[MAXN];
void build(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree[node] = ar[l];
		return;
	}

	build(node*2+1,l,(l+r)/2);
	build(node*2+2,(l+r)/2+1,r);

	tree[node] = tree[node*2+1] + tree[node*2+2];

}

void build2(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree2[node] = ar2[l];
		return;
	}

	build2(node*2+1,l,(l+r)/2);
	build2(node*2+2,(l+r)/2+1,r);

	tree2[node] = tree2[node*2+1] + tree2[node*2+2];

}

void update2(int node,int l,int r,int x,int y){
	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree2[node] += 1;
		if(l != r){
			lazy2[node*2+1] += 1;
			lazy2[node*2+2] += 1;
		}
		return;
	}
	update2(node*2+1,l,(l+r)/2,x,y);
	update2(node*2+2,(l+r)/2+1,r,x,y);
	tree2[node] = tree2[node*2+1] + tree2[node*2+2];
}

void update(int node,int l,int r,int x,int y,int value){
	if(lazy[node] != 0){
		tree[node] += lazy[node];
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree[node] += value;
		if(l != r){
			lazy[node*2+1] += value;
			lazy[node*2+2] += value;
		}
		return;
	}
	update(node*2+1,l,(l+r)/2,x,y,value);
	update(node*2+2,(l+r)/2+1,r,x,y,value);
	tree[node] = tree[node*2+1] + tree[node*2+2];
}

int query2(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] = lazy2[node];
			lazy2[node*2+2] = lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node]	;
	}

	LL q1 = query2(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query2(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

int query3(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy[node] != 0){
		tree[node] += lazy[node];
		if(l != r){
			lazy[node*2+1] = lazy[node];
			lazy[node*2+2] = lazy[node];
		}
		lazy[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree[node]	;
	}

	LL q1 = query3(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query3(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

int qq(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] = lazy2[node];
			lazy2[node*2+2] = lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node];
	}

	LL q1 = qq(node*2+1,l,(l+r)/2,x,y);
	LL q2 = qq(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

int main (){
	memset(lazy,0,sizeof(lazy));
	memset(ar2,0,sizeof(ar2));
	memset(lazy2,0,sizeof(lazy2));
	scanf("%d%d%d",&n,&m,&k);

	for(int i=0;i<n;i++){
		scanf("%d",&ar[i]);
	}
	build(1,0,n-1);
	for(int i=1;i<=m;i++){
		scanf("%d%d%d",&query[i].l,&query[i].r,&query[i].d);
	}

	for(int i=0;i<k;i++){
		int t1,t2;
		scanf("%d%d",&t1,&t2);
		update2(1,0,n-1,t1-1,t2-1);
	}

	for(int i=1;i<=m;i++){
		LL results = qq(1,0,n-1,i-1,i-1);
		LL batas_kiri = query[i].l;
		LL batas_kanan = query[i].r;
		LL tambah = query[i].d;
//		cout << "Batas Kiri : " << batas_kiri << endl;
//		cout << "Batas Kanan: " << batas_kanan << endl;
//		cout << "Tambah     : " << tambah << endl;
//		cout << "Result     : " << results << endl << endl;
		update(1,0,n-1,batas_kiri-1,batas_kanan-1,tambah*results);
	}

	for(int i=0;i<n;i++){
		printf("%I64d ",query3(1,0,n-1,i,i));
	}

	return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#include <cstdlib>
#include <utility>
#include<iostream>
#include <iterator>
#include <set>
typedef long long ll;
#define fi first
#define se second
#define PB(a) push_back(a);
#define INF = 1000000000;
#define REP(i,n) for (int i = 0; i < n; i++)
#define REPI(i,n) for (int i = 1; i <= n; i++)
#define REPN(i,n) for (int i = n-1; i >= 0; i--)
#define REPF(j,i,n) for (int j = i; j < n; j++)
#define LL long long
#define PI pair<int,int>
#define PL pair<long,long>
#define vi vector<int>
#define MAXN 100005
//int gcd(int a,int b){ return b == 0 ? a : gcd(b,a%b);}
//int lcm(int a,int b){ return a * (b/gcd(a,b)); }

using namespace std;

int n,m,k;
int ar[MAXN];

struct q{
	int l,r,d;
};

LL tree[4*MAXN];
LL lazy[4*MAXN];

q query[100005];
LL tree2[4*MAXN];
LL lazy2[4*MAXN];
LL ar2[MAXN];
void build(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree[node] = ar[l];
		return;
	}

	build(node*2+1,l,(l+r)/2);
	build(node*2+2,(l+r)/2+1,r);

	tree[node] = tree[node*2+1] + tree[node*2+2];

}

void build2(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree2[node] = ar2[l];
		return;
	}

	build2(node*2+1,l,(l+r)/2);
	build2(node*2+2,(l+r)/2+1,r);

	tree2[node] = tree2[node*2+1] + tree2[node*2+2];

}

void update2(int node,int l,int r,int x,int y){
	if(lazy2[node] != 0){
		tree2[node] += lazy2[node] * (r-l+1);
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree2[node] += 1;
		if(l != r){
			lazy2[node*2+1] += 1;
			lazy2[node*2+2] += 1;
		}
		return;
	}
	update2(node*2+1,l,(l+r)/2,x,y);
	update2(node*2+2,(l+r)/2+1,r,x,y);
	tree2[node] = tree2[node*2+1] + tree2[node*2+2];
}

void update(int node,int l,int r,int x,int y,LL value){
	if(lazy[node] != 0){
		tree[node] += lazy[node]  * (r-l+1);
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree[node] += value * (r-l+1);
		if(l != r){
			lazy[node*2+1] += value;
			lazy[node*2+2] += value;
		}
		return;
	}
	update(node*2+1,l,(l+r)/2,x,y,value);
	update(node*2+2,(l+r)/2+1,r,x,y,value);
	tree[node] = tree[node*2+1] + tree[node*2+2];
}

LL query3(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy[node] != 0){
		tree[node] += lazy[node]  * (r-l+1);
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree[node]	;
	}

	LL q1 = query3(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query3(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL qq(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node]  * (r-l+1);
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node];
	}

	LL q1 = qq(node*2+1,l,(l+r)/2,x,y);
	LL q2 = qq(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

int main (){
	memset(lazy,0,sizeof(lazy));
	memset(ar2,0,sizeof(ar2));
	memset(lazy2,0,sizeof(lazy2));
	scanf("%d%d%d",&n,&m,&k);

	for(int i=0;i<n;i++){
		scanf("%d",&ar[i]);
	}
	build(0,0,n-1);
	for(int i=1;i<=m;i++){
		scanf("%d%d%d",&query[i].l,&query[i].r,&query[i].d);
	}

	for(int i=0;i<k;i++){
		int t1,t2;
		scanf("%d%d",&t1,&t2);
		update2(0,0,n-1,t1-1,t2-1);
	}

	for(int i=1;i<=m;i++){
		LL results = qq(0,0,n-1,i-1,i-1);
		LL batas_kiri = query[i].l;
		LL batas_kanan = query[i].r;
		LL tambah = query[i].d;
//		cout << "Batas Kiri : " << batas_kiri << endl;
//		cout << "Batas Kanan: " << batas_kanan << endl;
//		cout << "Tambah     : " << tambah << endl;
//		cout << "Result     : " << results << endl << endl;
		update(0,0,n-1,batas_kiri-1,batas_kanan-1,tambah*results);
	}

	for(int i=0;i<n;i++){
		printf("%I64d ",query3(0,0,n-1,i,i));
	}

	return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#include <cstdlib>
#include <utility>
#include<iostream>
#include <iterator>
#include <set>
typedef long long ll;
#define fi first
#define se second
#define PB(a) push_back(a);
#define INF = 1000000000;
#define REP(i,n) for (int i = 0; i < n; i++)
#define REPI(i,n) for (int i = 1; i <= n; i++)
#define REPN(i,n) for (int i = n-1; i >= 0; i--)
#define REPF(j,i,n) for (int j = i; j < n; j++)
#define LL long long
#define PI pair<int,int>
#define PL pair<long,long>
#define vi vector<int>
#define MAXN 100005
//int gcd(int a,int b){ return b == 0 ? a : gcd(b,a%b);}
//int lcm(int a,int b){ return a * (b/gcd(a,b)); }

using namespace std;

int n,m,k;
int ar[MAXN];

struct q{
	int l,r,d;
};

LL tree[4*MAXN];
LL lazy[4*MAXN];

q query[100005];
LL tree2[4*MAXN];
LL lazy2[4*MAXN];
LL ar2[MAXN];
void build(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree[node] = ar[l];
		return;
	}

	build(node*2+1,l,(l+r)/2);
	build(node*2+2,(l+r)/2+1,r);

	tree[node] = tree[node*2+1] + tree[node*2+2];

}

void build2(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree2[node] = ar2[l];
		return;
	}

	build2(node*2+1,l,(l+r)/2);
	build2(node*2+2,(l+r)/2+1,r);

	tree2[node] = tree2[node*2+1] + tree2[node*2+2];

}

void update2(int node,int l,int r,int x,int y){
	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree2[node] += 1;
		if(l != r){
			lazy2[node*2+1] += 1;
			lazy2[node*2+2] += 1;
		}
		return;
	}
	update2(node*2+1,l,(l+r)/2,x,y);
	update2(node*2+2,(l+r)/2+1,r,x,y);
	tree2[node] = tree2[node*2+1] + tree2[node*2+2];
}

void update(int node,int l,int r,int x,int y,LL value){
	if(lazy[node] != 0){
		tree[node] += lazy[node];
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree[node] += value;
		if(l != r){
			lazy[node*2+1] += value;
			lazy[node*2+2] += value;
		}
		return;
	}
	update(node*2+1,l,(l+r)/2,x,y,value);
	update(node*2+2,(l+r)/2+1,r,x,y,value);
	tree[node] = tree[node*2+1] + tree[node*2+2];
}

LL query2(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node]	;
	}

	LL q1 = query2(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query2(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL query3(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy[node] != 0){
		tree[node] += lazy[node];
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree[node]	;
	}

	LL q1 = query3(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query3(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL qq(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] = lazy2[node];
			lazy2[node*2+2] = lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node];
	}

	LL q1 = qq(node*2+1,l,(l+r)/2,x,y);
	LL q2 = qq(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

int main (){
	memset(lazy,0,sizeof(lazy));
	memset(ar2,0,sizeof(ar2));
	memset(lazy2,0,sizeof(lazy2));
	scanf("%d%d%d",&n,&m,&k);

	for(int i=0;i<n;i++){
		scanf("%d",&ar[i]);
	}
	build(1,0,n-1);
	for(int i=1;i<=m;i++){
		scanf("%d%d%d",&query[i].l,&query[i].r,&query[i].d);
	}

	for(int i=0;i<k;i++){
		int t1,t2;
		scanf("%d%d",&t1,&t2);
		update2(1,0,n-1,t1-1,t2-1);
	}

	for(int i=1;i<=m;i++){
		LL results = qq(1,0,n-1,i-1,i-1);
		LL batas_kiri = query[i].l;
		LL batas_kanan = query[i].r;
		LL tambah = query[i].d;
//		cout << "Batas Kiri : " << batas_kiri << endl;
//		cout << "Batas Kanan: " << batas_kanan << endl;
//		cout << "Tambah     : " << tambah << endl;
//		cout << "Result     : " << results << endl << endl;
		update(1,0,n-1,batas_kiri-1,batas_kanan-1,tambah*results);
	}

	for(int i=0;i<n;i++){
		printf("%I64d ",query3(1,0,n-1,i,i));
	}

	return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#include <cstdlib>
#include <utility>
#include<iostream>
#include <iterator>
#include <set>
typedef long long ll;
#define fi first
#define se second
#define PB(a) push_back(a);
#define INF = 1000000000;
#define REP(i,n) for (int i = 0; i < n; i++)
#define REPI(i,n) for (int i = 1; i <= n; i++)
#define REPN(i,n) for (int i = n-1; i >= 0; i--)
#define REPF(j,i,n) for (int j = i; j < n; j++)
#define LL long long
#define PI pair<int,int>
#define PL pair<long,long>
#define vi vector<int>
#define MAXN 100005
//int gcd(int a,int b){ return b == 0 ? a : gcd(b,a%b);}
//int lcm(int a,int b){ return a * (b/gcd(a,b)); }

using namespace std;

int n,m,k;
int ar[MAXN];

struct q{
	int l,r,d;
};

int tree[4*MAXN];
int lazy[4*MAXN];

q query[100005];
LL tree2[4*MAXN];
LL lazy2[4*MAXN];
LL ar2[MAXN];
void build(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree[node] = ar[l];
		return;
	}

	build(node*2+1,l,(l+r)/2);
	build(node*2+2,(l+r)/2+1,r);

	tree[node] = tree[node*2+1] + tree[node*2+2];

}

void build2(int node,int l,int r){

	if(l > r ) return;

	if(l == r){
		tree2[node] = ar2[l];
		return;
	}

	build2(node*2+1,l,(l+r)/2);
	build2(node*2+2,(l+r)/2+1,r);

	tree2[node] = tree2[node*2+1] + tree2[node*2+2];

}

void update2(int node,int l,int r,int x,int y){
	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] += lazy2[node];
			lazy2[node*2+2] += lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree2[node] += 1;
		if(l != r){
			lazy2[node*2+1] += 1;
			lazy2[node*2+2] += 1;
		}
		return;
	}
	update2(node*2+1,l,(l+r)/2,x,y);
	update2(node*2+2,(l+r)/2+1,r,x,y);
	tree2[node] = tree2[node*2+1] + tree2[node*2+2];
}

void update(int node,int l,int r,int x,int y,int value){
	if(lazy[node] != 0){
		tree[node] += lazy[node];
		if(l != r){
			lazy[node*2+1] += lazy[node];
			lazy[node*2+2] += lazy[node];
		}
		lazy[node] = 0;
	}
	if(l > r || l > y || r < x) return;
	if(l >= x && r <= y){
		tree[node] += value;
		if(l != r){
			lazy[node*2+1] += value;
			lazy[node*2+2] += value;
		}
		return;
	}
	update(node*2+1,l,(l+r)/2,x,y,value);
	update(node*2+2,(l+r)/2+1,r,x,y,value);
	tree[node] = tree[node*2+1] + tree[node*2+2];
}

LL query2(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] = lazy2[node];
			lazy2[node*2+2] = lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node]	;
	}

	LL q1 = query2(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query2(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL query3(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy[node] != 0){
		tree[node] += lazy[node];
		if(l != r){
			lazy[node*2+1] = lazy[node];
			lazy[node*2+2] = lazy[node];
		}
		lazy[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree[node]	;
	}

	LL q1 = query3(node*2+1,l,(l+r)/2,x,y);
	LL q2 = query3(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

LL qq(int node,int l,int r,int x,int y){

	if(l > r || l > y || r < x) return 0;

	if(lazy2[node] != 0){
		tree2[node] += lazy2[node];
		if(l != r){
			lazy2[node*2+1] = lazy2[node];
			lazy2[node*2+2] = lazy2[node];
		}
		lazy2[node] = 0;
	}
	if(l >= x && r <= y) {
		return tree2[node];
	}

	LL q1 = qq(node*2+1,l,(l+r)/2,x,y);
	LL q2 = qq(node*2+2,(l+r)/2+1,r,x,y);

	LL result = q1 + q2;

	return result;
}

int main (){
	memset(lazy,0,sizeof(lazy));
	memset(ar2,0,sizeof(ar2));
	memset(lazy2,0,sizeof(lazy2));
	scanf("%d%d%d",&n,&m,&k);

	for(int i=0;i<n;i++){
		scanf("%d",&ar[i]);
	}
	build(1,0,n-1);
	for(int i=1;i<=m;i++){
		scanf("%d%d%d",&query[i].l,&query[i].r,&query[i].d);
	}

	for(int i=0;i<k;i++){
		int t1,t2;
		scanf("%d%d",&t1,&t2);
		update2(1,0,n-1,t1-1,t2-1);
	}

	for(int i=1;i<=m;i++){
		LL results = qq(1,0,n-1,i-1,i-1);
		LL batas_kiri = query[i].l;
		LL batas_kanan = query[i].r;
		LL tambah = query[i].d;
//		cout << "Batas Kiri : " << batas_kiri << endl;
//		cout << "Batas Kanan: " << batas_kanan << endl;
//		cout << "Tambah     : " << tambah << endl;
//		cout << "Result     : " << results << endl << endl;
		update(1,0,n-1,batas_kiri-1,batas_kanan-1,tambah*results);
	}

	for(int i=0;i<n;i++){
		printf("%I64d ",query3(1,0,n-1,i,i));
	}

	return 0;
}