#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
priority_queue<long long, vector<long long>, greater<long long> > q;
long long a[N], b[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
  }
  long long s = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &b[i]);
    q.push(a[i] + s);
    s += b[i];
    long long ans = 0;
    while (q.size() && q.top() < s) {
      long long t = q.top();
      q.pop();
      ans += t - s + b[i];
    }
    ans += (q.size()) * b[i];
    cout << ans << " " << endl;
  }
  return 0;
}
