//Segment Tree is a State of Mind
#include <bits/stdc++.h>
using namespace std;
#define debug(x) cerr<<#x<<" is "<<x<<endl;
#define debugp(x,y) cerr<<#x<<' '<<#y<<" is "<<x<<' '<<y<<endl;
#define debugl(x) cerr<<#x<<" is ";for(auto p:x)cerr<<p<<" ";cerr<<endl;
#define debugpl(x) cerr<<#x<<" is ";for(auto p:x)cerr<<p.first<<" "<<p.second<<" , ";cerr<<endl;
#define int long long
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<int,pii> ipii;
#define pb push_back
#define fi first
#define se second
#define sz(x) (int)(x).size()
#define rdint(x,y) rnd()%(y-x+1)+x
const int inf=4e18+5;
const int mod=1e9+7;
const int mod2=998244353;
const int mod3=1e9+9;
const int maxn=2e5+5;
/*
struct dat{
int a;
map <string,int> o;
}
dat merge(dat x,dat y){
*/
int ans[maxn];
signed main(){
ios_base::sync_with_stdio(0);cin.tie(0);
int n,q;cin>>n>>q;
int a[n];
for(int i=0;i<n;i++)cin>>a[i];
int b[q+1];
b[0]=0;
for(int i=1;i<=q;i++)cin>>b[i];
int p[q+1],pmx[q+1],pmn[q+1];
p[0]=0,pmx[0]=0,pmn[0]=0;
for(int i=1;i<=q;i++){
p[i]=p[i-1]+b[i];
pmx[i]=max(pmx[i-1],p[i]);
pmn[i]=max(pmn[i-1],-p[i]);
}
int hm[n];
for(int i=1;i<n;i++){//left
int l=a[i-1]-1,h=a[i];
while(l<h-1){
int m=(l+h)/2;
int tr=lower_bound(pmn,pmn+q+1,a[i]-m)-pmn;
int tl=upper_bound(pmx,pmx+q+1,m-a[i-1])-pmx;
if(tr<q+1&&tr<=tl)h=m;
else l=m;
}
ans[i]+=a[i]-h;
hm[i]=h;
}
ans[0]=pmn[q];
ans[n-1]+=pmx[q];
for(int i=0;i<n-1;i++){
ans[i]+=min(pmx[q],hm[i+1]-a[i]);
}
//debugl(pmn)debugl(pmx)debugl(hm)
for(int i=0;i<n;i++)cout<<ans[i]<<'\n';
}