#include <bits/stdc++.h>
using namespace std;
struct snow {
  long long vs, t, v;
  bool operator<(snow a) const { return vs > a.vs; }
};
snow d[100005];
long long ans[100005];
int main() {
  long long n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> d[i].v;
  long long temp = 0;
  for (int i = 0; i < n; i++) {
    cin >> d[i].t;
    d[i].vs = d[i].v + temp;
    temp += d[i].t;
  }
  priority_queue<snow> pq;
  temp = 0;
  for (int i = 0; i < n; i++) {
    pq.push(d[i]);
    ans[i] = 0;
    while (!pq.empty() && pq.top().vs <= temp + d[i].t) {
      ans[i] += pq.top().vs - temp;
      pq.pop();
    }
    ans[i] += pq.size() * d[i].t;
    temp += d[i].t;
  }
  for (int i = 0; i < n; i++) cout << ans[i] << endl;
  return 0;
}
