No.1178 Can you draw a Circle?
レベル :
/ AI推定難易度 : 204
/ 実行時間制限 : 1ケース 2.000秒 / メモリ制限
: 512 MB / 小数誤差許容問題 絶対誤差または相対誤差が $10^{-4}$ 以下。ただし、ジャッジ側の都合で500桁未満にしてください
タグ : / 解いたユーザー数 175
作問者 :
okazakisteve
/ テスター :
NatsubiSogan
タグ : / 解いたユーザー数 175
作問者 :
問題文最終更新日: 2020-08-31 18:34:51
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 262
(順位表)
の他の問題:
Apology and Correction
There were errors in the intended solution and the test cases. We apologize.
They have now been fixed.
Problem Statement
Find the radius of the circle $ax^2 + by^2 + cx + dy + e = f$ on the $xy$-coordinate plane.
Input
$a$ $b$ $c$ $d$ $e$ $f$
- All inputs are integers.
- $-100 \leq a,b,c,d,e,f \leq 100$
- $a,b \neq 0$ and $a = b$
- For the given input, the equation always forms a circle (with a positive radius). (Added 8/21 22:31)
- Test cases have been added. (Added 8/26 20:26)
Output
Your answer is accepted if its absolute or relative error from the expected answer is at most $10^{-4}$.
Print a newline at the end.
Sample
Sample 1
Input
1 1 -2 4 1 0
Output
2.000000000000000
The center is $(1,-2)$.
Sample 2
Input
1 1 0 -6 1 0
Output
2.828427124746190
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。