Problem E
Elder price robot
Input
The first line of input contains a single integer $2 \leq n \leq 400\, 000$, the number of days for which you have collected price data for the item. On the second line of input follows $n$ space-separated integers $p_1, p_2, \ldots , p_{n}$, where $0 \leq p_ i \leq 10^6$ is the price of the item $i-1$ days ago. Today’s price is $p_1$.
Output
Output $n$ rows, one for each day you have collected price data for the item. On the $i^{\text {th}}$ such line, output the BarGain score for the day that was $i-1$ days ago.
Sample Input 1 | Sample Output 1 |
---|---|
6 9 10 11 9 12 11 |
3 2 1 infinity 1 infinity |