include[HTML_REMOVED]
using namespace std;
int a[100010],b[100010];
int main()
{
int n,m;
cin>>n>>m;
for(int i=1;i<=n;i)
{
cin>>a[i];
b[i]=a[i]-a[i-1];
}
while(m–)
{
int l,r,c;
cin>>l>>r>>c;
b[l]+=c;
b[r+1]-=c;
}
for(int i=1;i<=n;i)b[i]+=b[i-1];
for(int i=1;i<=n;i++)printf(“%d “,b[i]);
return 0;
}