#include <bits/stdc++.h>
using namespace std;
multiset<long long> S;
int a[100010], b[100010], n;
long long tmp, melted, ans[100010];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  for (int i = 0; i < n; i++) scanf("%d", b + i);
  for (int i = 0; i < n; i++) {
    S.insert(a[i] + melted);
    melted += b[i];
    while (*S.begin() <= melted) {
      tmp = *S.begin();
      S.erase(S.begin());
      ans[i] += (b[i] - melted + tmp);
      if (S.empty()) break;
    }
    ans[i] += S.size() * b[i];
  }
  for (int i = 0; i < n; i++) printf("%lld ", ans[i]);
  return 0;
}
