CF923B Producing Snow

题目描述

Alice非常喜欢雪! 她每天都会堆一堆 $V$ 升的雪,然而每堆雪每天都会融化 $T$ 升,当然,要是这堆雪的体积 $V\le0$ 时,它就永远消失了。 现在她想知道,$n$ 天中每天融化了多少升雪呢?

输入格式

第一行包括一个整数 $n$($1\le n\le 10^{5}$)表示天数。 第二行包括 $n$ 个整数 $V_{1},V_{2},...,V_{N}$ 表示每天堆的那堆雪的体积。 第三行包括 $n$ 个整数 $T_{1},T_{2},...,T_{N}$ 表示每天每堆雪融化的体积。

输出格式

输出一行,每一天雪总共的融化量(共 $n$ 个整数)。 Translated by @Playnext

说明/提示

In the first sample, Bob first makes a snow pile of volume 10, which melts to the size of 5 on the same day. On the second day, he makes another pile of size 10. Since it is a bit warmer than the day before, the first pile disappears completely while the second pile shrinks to 3. At the end of the second day, he has only a single pile of size 3. On the third day he makes a smaller pile than usual, but as the temperature dropped too, both piles survive till the end of the day.