103080: [Atcoder]ABC308 A - New Scheme

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:12 Solved:0

Description

Score : $100$ points

Problem Statement

Given eight integers $S_1,S_2,\dots$, and $S_8$, print Yes if they satisfy all of the following three conditions, and No otherwise.

  • The sequence $(S_1,S_2,\dots,S_8)$ is monotonically non-decreasing. In other words, $S_1 \leq S_2 \leq \dots \leq S_8$.
  • $S_1,S_2,\dots$, and $S_8$ are all between $100$ and $675$, inclusive.
  • $S_1,S_2,\dots$, and $S_8$ are all multiples of $25$.

Constraints

  • $0\leq S_i \leq 1000$
  • All input values are integers.

Input

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

$S_1$ $S_2$ $\dots$ $S_8$

Output

Print the answer.


Sample Input 1

125 175 250 300 400 525 600 650

Sample Output 1

Yes

They satisfy all of the three conditions.


Sample Input 2

100 250 300 400 325 575 625 675

Sample Output 2

No

They violate the first condition because $S_4 > S_5$.


Sample Input 3

0 23 24 145 301 413 631 632

Sample Output 3

No

They violate the second and third conditions.

Input

题意翻译

给出 $8$ 个整数 $S_1,\dots,S_8$,判断他们是否满足以下 $3$ 个条件: - 依次**不降** - 都在 $100\sim675$ 间 - 都是 $25$ 的倍数。 输入数据满足 $0\le S_i\le 1000$。

Output

分数:100分

问题描述

给定八个整数$S_1,S_2,\dots$, 和$S_8$,如果它们满足以下三个条件中的所有条件,则打印Yes,否则打印No

  • 序列$(S_1,S_2,\dots,S_8)$是单调非递减的。换句话说,$S_1 \leq S_2 \leq \dots \leq S_8$。
  • $S_1,S_2,\dots$和$S_8$都在100和675之间,包括100和675。
  • $S_1,S_2,\dots$和$S_8$都是25的倍数。

约束

  • $0\leq S_i \leq 1000$
  • 所有输入值都是整数。

输入

输入从标准输入中以以下格式给出:

$S_1$ $S_2$ $\dots$ $S_8$

输出

打印答案。


样例输入1

125 175 250 300 400 525 600 650

样例输出1

Yes

它们满足所有三个条件。


样例输入2

100 250 300 400 325 575 625 675

样例输出2

No

它们违反了第一个条件,因为$S_4 > S_5$。


样例输入3

0 23 24 145 301 413 631 632

样例输出3

No

它们违反了第二个和第三个条件。

HINT

8个数字,都是25的倍数,100~675之间,且不递减?

加入题单

算法标签: