1251 - LL's sink
Time Limit : 1 Second
Memory Limit : 128 MB
Submission: 64
Solved: 22
- Description
- There is a sink in LL’s factory. The sink has length N and width 1. The wall of the sink has infinite height. Someday LL inserts N-1 boards into the sink with the same spacing. The thickness of the boards can be neglected. The heights of the boards are L1,L2…Ln-1 respectively. So there are N slots. LL pours water of volume V into the first slot. Your task is to calculate the height of water in each slot when the water reaches the steady state.
- Input
- There are multiple cases ended with EOF. Every case is terminated with a blank line .
The first two numbers of each case are two integers——
N (1 <= N <= 10000), V(1 <= V <= 20000 ).
The following N-1 numbers are the heights of the boards Li (1 <= Li <= 100), - Output
- For each test, output one line containing N numbers rounded to two decimals——the heights of water in N slots.
- sample input
-
4 6 3 2 1
- sample output
-
3.00 2.00 1.00 0.00
- hint
- source
- LL LL