Codeforces Beta Round 69 (Div. 1 Only)
E
Martian Food
Codeforces
2800
原题
← D→
翻译中…

Have you ever tasted Martian food? Well, you should.

翻译中…

Their signature dish is served on a completely black plate with the radius of $*R*$, flat as a pancake.

翻译中…

First, they put a perfectly circular portion of the Golden Honduras on the plate. It has the radius of $*r*$ and is located as close to the edge of the plate as possible staying entirely within the plate. I. e. Golden Honduras touches the edge of the plate from the inside. It is believed that the proximity of the portion of the Golden Honduras to the edge of a plate demonstrates the neatness and exactness of the Martians.

翻译中…

Then a perfectly round portion of Pink Guadeloupe is put on the plate. The Guadeloupe should not overlap with Honduras, should not go beyond the border of the plate, but should have the maximum radius. I. e. Pink Guadeloupe should touch the edge of the plate from the inside, and touch Golden Honduras from the outside. For it is the size of the Rose Guadeloupe that shows the generosity and the hospitality of the Martians.

翻译中…

Further, the first portion (of the same perfectly round shape) of Green Bull Terrier is put on the plate. It should come in contact with Honduras and Guadeloupe, should not go beyond the border of the plate and should have maximum radius.

翻译中…

Each of the following portions of the Green Bull Terrier must necessarily touch the Golden Honduras, the previous portion of the Green Bull Terrier and touch the edge of a plate, but should not go beyond the border.

翻译中…

To determine whether a stranger is worthy to touch the food, the Martians ask him to find the radius of the $*k*$-th portion of the Green Bull Terrier knowing the radii of a plate and a portion of the Golden Honduras. And are you worthy?

翻译中…

Input

翻译中…

The first line contains integer $*t*$ ($1 ≤ *t* ≤ 10^{4}$) — amount of testcases.

翻译中…

Each of the following $*t*$ lines contain three positive integers: the radii of the plate and a portion of the Golden Honduras $*R*$ and $*r*$ ($1 ≤ *r* < *R* ≤ 10^{4}$) and the number $*k*$ ($1 ≤ *k* ≤ 10^{4}$).

翻译中…

In the pretests $1 ≤ *k* ≤ 2$.

翻译中…

Output

翻译中…

Print $*t*$ lines — the radius of the $*k*$-th portion of the Green Bull Terrier for each test. The absolute or relative error of the answer should not exceed $10^{ - 6}$.

翻译中…

Note

翻译中…

Dish from the first sample looks like this:

翻译中…

image

翻译中…

Dish from the second sample looks like this:

翻译中…

image

翻译中…

样例

Input #1
2
4 3 1
4 2 2
Output #1
0.9230769231
0.6666666667
InputCopy OutputCopy
题目信息
题号
77E
时间限制
1 s
内存限制
256 MB
标签
计算几何

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