問題一覧 > 通常問題

No.1064 ∪∩∩ / Cup Cap Cap

レベル : / AI推定難易度 : 450 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 小数誤差許容問題 絶対誤差または相対誤差が $10^{-6}$ 以下。ただし、ジャッジ側の都合で500桁未満にしてください
タグ : (AC するまで非表示) / 解いたユーザー数 254
作問者 : null / テスター : ui_mtc
お気に入りにしたユーザー ProblemId : 4108 / 自分の提出
問題文最終更新日: 2022-04-25 23:35:00
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 250 (順位表) の他の問題:

Problem Statement

On the $xy$-plane, there are parabolas $C_1:y=x^2+ax+b$ and $C_2:y=-x^2+cx+d$.
If $C_1$ and $C_2$ have $0$ intersection points, output No; if they have $1$, output Yes; if they have $2$, find the equation $y=px+q$ of the line passing through those two points.

Input

$a\ b\ c\ d$

$-10^5 \le a, b, c, d \le 10^5$
All inputs are integers.

Output

If there are $0$ intersection points, output

No
if there is $1$ intersection point, output
Yes
and if there are $2$ intersection points, output
$p\ q$
(where $p, q$ are the values in $y=px+q$ from the problem statement)
on one line. Print a newline at the end. An error of up to $10^{-6}$ is allowed in the smaller of the absolute error and the relative error.
It is guaranteed that $|p, q| \le 10^{18}$.

Sample

Sample 1
Input
0 0 0 5
Output
0.0000000000 2.5000000000

Sample 2
Input
0 0 0 0
Output
Yes

They intersect only at $(0,0)$.

Sample 3
Input
0 1 0 0
Output
No

They do not intersect.

Sample 4
Input
79716 54835 73742 74932
Output
76729.0000000000 64883.5000000000

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。