{"problem":{"name":"E. Martian Food","description":{"content":"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 portio","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF77E"},"statements":[{"statement_type":"Markdown","content":"Have you ever tasted Martian food? Well, you should.\n\nTheir signature dish is served on a completely black plate with the radius of _R_, flat as a pancake.\n\nFirst, 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.\n\nThen 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.\n\nFurther, 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.\n\nEach 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.\n\nTo 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?\n\n## Input\n\nThe first line contains integer _t_ (1 ≤ _t_ ≤ 104) — amount of testcases.\n\nEach 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).\n\nIn the pretests 1 ≤ _k_ ≤ 2.\n\n## Output\n\nPrint _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.\n\n[samples]\n\n## Note\n\nDish from the first sample looks like this:\n\n![image](https://espresso.codeforces.com/7a8b63c4326222fafc2b2071fc0999682d5e7b4e.png)\n\nDish from the second sample looks like this:\n\n![image](https://espresso.codeforces.com/be3a05eaebdf85dd076387ffa45102baece7be53.png)","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"你尝过火星食物吗？好吧，你应该尝一尝。\n\n他们的招牌菜盛放在一个完全黑色的盘子上，盘子的半径为 $R$，像煎饼一样平坦。\n\n首先，他们在盘子上放上一块完美的圆形金洪都拉斯。它的半径为 $r$，并尽可能靠近盘子边缘放置，但完全位于盘子内部。也就是说，金洪都拉斯从内部与盘子边缘相切。人们认为，金洪都拉斯靠近盘子边缘的位置体现了火星人的整洁与精确。\n\n接着，在盘子上放置一块完美的圆形粉红瓜德罗普。瓜德罗普不能与洪都拉斯重叠，不能超出盘子边界，但应具有最大可能的半径。也就是说，粉红瓜德罗普应从内部与盘子边缘相切，并从外部与金洪都拉斯相切。因为粉红瓜德罗普的大小体现了火星人的慷慨与好客。\n\n接下来，放置第一块（同样为完美圆形）绿牛头犬。它必须与洪都拉斯和瓜德罗普接触，不能超出盘子边界，并具有最大半径。\n\n后续每一块绿牛头犬都必须与金洪都拉斯、前一块绿牛头犬以及盘子边缘接触，但不能超出盘子边界。\n\n为了判断一位陌生人是否配得上享用这道菜，火星人要求他根据盘子和金洪都拉斯的半径，计算出第 $k$ 块绿牛头犬的半径。那么，你配得上吗？\n\n第一行包含整数 $t$（$1 ≤ t ≤ 10^4$）——测试用例的数量。\n\n接下来的 $t$ 行每行包含三个正整数：盘子和金洪都拉斯的半径 $R$ 和 $r$（$1 ≤ r < R ≤ 10^4$）以及编号 $k$（$1 ≤ k ≤ 10^4$）。\n\n在预测试中，$1 ≤ k ≤ 2$。\n\n请输出 $t$ 行——每个测试用例中第 $k$ 块绿牛头犬的半径。答案的绝对误差或相对误差不得超过 $10^{-6}$。\n\n第一个样例的菜品如下所示：\n\n第二个样例的菜品如下所示：\n\n## Input\n\n第一行包含整数 $t$（$1 ≤ t ≤ 10^4$）——测试用例的数量。接下来的 $t$ 行每行包含三个正整数：盘子和金洪都拉斯的半径 $R$ 和 $r$（$1 ≤ r < R ≤ 10^4$）以及编号 $k$（$1 ≤ k ≤ 10^4$）。在预测试中，$1 ≤ k ≤ 2$。\n\n## Output\n\n请输出 $t$ 行——每个测试用例中第 $k$ 块绿牛头犬的半径。答案的绝对误差或相对误差不得超过 $10^{-6}$。\n\n[samples]\n\n## Note\n\n第一个样例的菜品如下所示：第二个样例的菜品如下所示：","is_translate":true,"language":"Chinese"}],"meta":{"iden":"CF77E","tags":["geometry"],"sample_group":[["2\n4 3 1\n4 2 2","0.9230769231\n0.6666666667"]],"created_at":"2026-03-03 11:00:39"}}