No.1107 Miyoshi Accent
タグ : / 解いたユーザー数 499
作問者 :
trineutron
/ テスター :
Rute
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もしくは右上の雲マークをクリックしてアカウントを作成してください。