#include <bits/stdc++.h>
using namespace std;
priority_queue<long long, vector<long long>, greater<long long> > q;
int n, A[100010], T[100010];
long long sum[100010];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &A[i]);
  for (int i = 1, t; i <= n; ++i) {
    scanf("%d", &T[i]);
    sum[i] = sum[i - 1] + T[i];
  }
  for (int i = 1; i <= n; ++i) {
    long long Ans = 0;
    q.push(A[i] + sum[i - 1]);
    while (!q.empty() && q.top() <= sum[i]) {
      Ans += q.top() - sum[i - 1];
      q.pop();
    }
    Ans += q.size() * 1ll * T[i];
    printf("%I64d ", Ans);
  }
  return 0;
}
