CF77E.Martian Food
省选/NOI-
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
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?
你尝过火星食物吗?当然应该尝一尝。
他们的招牌菜盛放在一个完全黑色的圆形餐盘上,餐盘半径为 R,平整如薄饼。
首先,他们在盘中放置一份完美的圆形“金色洪都拉斯”(Golden Honduras)菜肴,其半径为 r,且尽可能靠近餐盘边缘,同时完全位于盘内——即,“金色洪都拉斯”从内侧与餐盘边缘相切。据信,“金色洪都拉斯”与餐盘边缘的接近程度体现了火星人的整洁与精确。
接着,在盘中放置一份完美的圆形“粉红瓜德罗普”(Pink Guadeloupe)菜肴。该菜肴不得与“金色洪都拉斯”重叠,也不得超出餐盘边界,但应具有最大可能的半径。即,“粉红瓜德罗普”须从内侧与餐盘边缘相切,且从外侧与“金色洪都拉斯”相切。因为“粉红瓜德罗普”的尺寸象征着火星人的慷慨与好客。
随后,在盘中放置第一份同样为完美圆形的“绿色斗牛梗”(Green Bull Terrier)菜肴。它必须同时与“金色洪都拉斯”和“粉红瓜德罗普”相切,不得超出餐盘边界,且应具有最大可能的半径。
此后每一份“绿色斗牛梗”均须同时与“金色洪都拉斯”、前一份“绿色斗牛梗”以及餐盘边缘相切,且不得超出餐盘边界。
为判断一位陌生人是否有资格触碰这道美食,火星人会要求他根据餐盘半径 R 与“金色洪都拉斯”半径 r,计算出第 k 份“绿色斗牛梗”的半径。那么,你有这个资格吗?
输入格式
The first line contains integer t (1 ≤ t ≤ 104) — 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 ≤ 104) and the number k (1 ≤ k ≤ 104).
In the pretests 1 ≤ k ≤ 2.
第一行包含一个整数 t(1≤t≤104)—— 测试用例的数量。
接下来的 t 行中,每行包含三个正整数:盘子与一份“黄金洪都拉斯”(Golden Honduras)的半径 R 和 r(1≤r<R≤104),以及数字 k(1≤k≤104)。
在预测试中,满足 1≤k≤2。
输出格式
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.
输出 t 行——对每个测试用例,输出绿色斗牛梗第 k 段的半径。答案的绝对或相对误差不得超过 10−6。
输入输出样例
输入#1
2 4 3 1 4 2 2
输出#1
0.9230769231 0.6666666667
说明/提示
Dish from the first sample looks like this:

Dish from the second sample looks like this:

第一个样例中的盘子如下所示:

第二个样例中的盘子如下所示:

输入解题思路,AI测评打分。不知道怎么写?