显示代码纯文本
#include<iostream>
#include<fstream>
#include<cstdio>
#include<cstring>
using namespace std;
const int maxn=100005;
int h[maxn],d[maxn];
int n,m,a,b,c,q;
int main(){
#define COGS
#ifdef COGS
freopen("thebigmatch.in","r",stdin);
freopen("thebigmatch.out","w",stdout);
#endif
scanf("%d",&n);
for(int i=1;i<=n;i++)scanf("%d",&h[i]);
for(int i=1;i<=n;i++)scanf("%d",&d[i]);
scanf("%d",&m);
for(int i=0;i<m;i++){
scanf("%d",&q);
if(q){
for(int i=1;i<=n;i++)printf("%d ",h[i]);
putchar('\n');
}
else{
scanf("%d%d%d",&a,&b,&c);
for(int i=a;i<=b;i++)h[i]-=c-d[i];
}
}
return 0;
}