問題一覧 > 通常問題

No.2508 Discriminant

レベル : / AI推定難易度 : 400 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 186
作問者 : 👑 獅子座じゃない人 / テスター : PCTprobability Mizar 👑 KA37RI 👑 amentorimaru
お気に入りにしたユーザー ProblemId : 9807 / 自分の提出
問題文最終更新日: 2023-10-20 21:16:13
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 409 (順位表) の他の問題:

Problem Statement

You are given integers $a,p,q$. Here, it is guaranteed that $a \neq 0$.

It is guaranteed that there uniquely exists a pair of integers $(b,c)$ such that the $2$ polynomials $a(x-p)(x-q),\ ax^2+bx+c$ are equal as polynomials.

Determine whether $b^2>4ac$.

Input

$a\ p\ q$

  • All inputs are integers.
  • $-10^{10^5}\lt a\lt 10^{10^5}$
  • $-10^{10^5}\lt p\lt 10^{10^5}$
  • $-10^{10^5}\lt q\lt 10^{10^5}$
  • $a\neq 0$

Output

If $b^2>4ac$, print Yes; otherwise, print No.

Sample

Sample 1
Input
2 4 2
Output
Yes

Since $2(x-4)(x-2)=2x^2-12x+16$, we have $a=2,\ b=-12,\ c=16$.

Since $b^2=144>128=4ac$, print Yes.

Sample 2
Input
-10 -1 -1
Output
No

The input may contain negative integers.

Sample 3
Input
1 0 314159265358979323846264338327
Output
Yes

Note that the input integers may be very large.

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