問題一覧 > 通常問題

No.3421 How Many Peaks?

レベル : / AI推定難易度 : 208 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 96
作問者 : syndrome / テスター : まみめ harel hirayuu_yc rogi52 👑 qand kidodesu 👑 ArcAki Eku
お気に入りにしたユーザー ProblemId : 12909 / 自分の提出
問題文最終更新日: 2026-01-11 12:50:07
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 YNUCPC Contest 2 (順位表) の他の問題:

Problem Statement

Consider the real-valued function $f(x) = ax^3 + bx^2 + cx + d$.

Print Yes if $f(x)$ has two extrema, and No otherwise.

You are given $T$ test cases; find the answer for each of them.

What is an extremum?
For a real-valued function $g(x)$, consider any $b$ in a sufficiently small open interval containing the point $a$.
If $b \neq a \Longrightarrow g(b) < g(a)$ holds, $g(a)$ is called a local maximum, and
if $b \neq a \Longrightarrow g(b) > g(a)$ holds, $g(a)$ is called a local minimum.
Local maxima and local minima are collectively called extrema.

Input

  • $1\leq T \leq 10000$
  • $-100 \leq a, b, c, d \leq 100$
  • All input values are integers.

The input is given from Standard Input in the following format.

$T$
$case_1$
$case_2$
$\vdots$
$case_T$

Each test case is given in the following format.

$a\;b\;c\;d$

Output

Print $T$ lines.
On the $i$-th line, for the $i$-th test case,
print Yes if $f(x)$ has two extrema, and No otherwise.


Sample

Sample 1
Input
2
1 -3 2 1
8 1 7 -3
Output
Yes
No
Sample 2
Input
1
0 1 0 0
Output
No

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