CF283A Cows and Sequence
Description
Bessie and the cows are playing with sequences and need your help. They start with a sequence, initially containing just the number 0, and perform $ n $ operations. Each operation is one of the following:
1. Add the integer $ x_{i} $ to the first $ a_{i} $ elements of the sequence.
2. Append an integer $ k_{i} $ to the end of the sequence. (And hence the size of the sequence increases by 1)
3. Remove the last element of the sequence. So, the size of the sequence decreases by one. Note, that this operation can only be done if there are at least two elements in the sequence.
After each operation, the cows would like to know the average of all the numbers in the sequence. Help them!
Input Format
The first line contains a single integer $ n (1
Output Format
Output $ n $ lines each containing the average of the numbers in the sequence after the corresponding operation.
The answer will be considered correct if its absolute or relative error doesn't exceed $ 10^{-6} $ .
Explanation/Hint
In the second sample, the sequence becomes 