問題一覧 > 通常問題

No.1107 Miyoshi Accent

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 499
作問者 : trineutron / テスター : Rute
お気に入りにしたユーザー ProblemId : 3486 / 自分の提出
問題文最終更新日: 2022-04-26 01:59:28
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 256 (順位表) の他の問題:

Problem Statement

Among the musical symbols used in choral singing, there is one called the "Miyoshi accent". The Miyoshi accent is an instruction to perform a single note so as to create a crescendo and a decrescendo within it. Orion-kun has decided to apply this to a sequence $A_1, A_2, A_3, A_4$ of length $4$. The sequence is defined to be a Miyoshi accent if $A_1 < A_2$ and $A_3 > A_4$, and not a Miyoshi accent otherwise. Given $A_1, A_2, A_3, A_4$, determine whether this sequence is a Miyoshi accent.

Input

$A_1\ A_2\ A_3\ A_4$

$A_1$ through $A_4$ are given, separated by spaces.

All inputs are integers.
$1 \le A_1, A_2, A_3, A_4 \le 9$

Output

Output $YES$ if the sequence is a Miyoshi accent, and $NO$ if it is not. Print a newline at the end.

Sample

Sample 1
Input
1 3 3 2
Output
YES

Since $A_1 < A_2$ and $A_3 > A_4$, this is a Miyoshi accent.

Sample 2
Input
2 4 7 9
Output
NO

Since $A_3 < A_4$, this is not a Miyoshi accent.

Sample 3
Input
4 4 7 2
Output
NO

Since $A_1 = A_2$, this is not a Miyoshi accent.

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