Tinkoff Challenge - Final Round (Codeforces Round 414, rated, Div. 1 + Div. 2)
B
Cutting Carrot
Codeforces
1200
原题
← AC →
翻译中…

Igor the analyst has adopted $*n*$ little bunnies. As we all know, bunnies love carrots. Thus, Igor has bought a carrot to be shared between his bunnies. Igor wants to treat all the bunnies equally, and thus he wants to cut the carrot into $*n*$ pieces of equal area.

翻译中…

Formally, the carrot can be viewed as an isosceles triangle with base length equal to $1$ and height equal to $*h*$. Igor wants to make $*n* - 1$ cuts parallel to the base to cut the carrot into $*n*$ pieces. He wants to make sure that all $*n*$ pieces have the same area. Can you help Igor determine where to cut the carrot so that each piece have equal area?

翻译中…

image Illustration to the first example.

翻译中…

Input

翻译中…

The first and only line of input contains two space-separated integers, $*n*$ and $*h*$ ($2 ≤ *n* ≤ 1000$, $1 ≤ *h* ≤ 10^{5}$).

翻译中…

Output

翻译中…

The output should contain $*n* - 1$ real numbers $*x*_{1}, *x*_{2}, ..., *x*_{*n* - 1}$. The number $*x*_{*i*}$ denotes that the $*i*$-th cut must be made $*x*_{*i*}$ units away from the apex of the carrot. In addition, $0 < *x*_{1} < *x*_{2} < ... < *x*_{*n* - 1} < *h*$ must hold.

翻译中…

Your output will be considered correct if absolute or relative error of every number in your output doesn't exceed $10^{ - 6}$.

翻译中…

Formally, let your answer be $*a*$, and the jury's answer be $*b*$. Your answer is considered correct if image.

翻译中…

Note

翻译中…

Definition of isosceles triangle: https://en.wikipedia.org/wiki/Isosceles_triangle.

翻译中…

样例

Input #1
3 2
Output #1
1.154700538379 1.632993161855
InputCopy OutputCopy
Input #2
2 100000
Output #2
70710.678118654752
InputCopy OutputCopy
题目信息
题号
794B
时间限制
2 s
内存限制
256 MB
标签
计算几何
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。