102111: [AtCoder]ABC211 B - Cycle Hit

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

Description

Score : $200$ points

Problem Statement

You are given four strings $S_1$, $S_2$, $S_3$, and $S_4$.
Determine whether this sequence of strings has one of each of the following: H, 2B, 3B, and HR.
Here, it is guaranteed that every $S_i$ is H, 2B, 3B, or HR.

Constraints

  • Each $S_i$ is H, 2B, 3B, or HR.

Input

Input is given from Standard Input in the following format:

$S_1$
$S_2$
$S_3$
$S_4$

Output

If the given sequence of strings has one of each of H, 2B, 3B, and HR, print Yes.
Otherwise, print No.


Sample Input 1

3B
HR
2B
H

Sample Output 1

Yes

We have one of each of H, 2B, 3B, and HR.


Sample Input 2

2B
3B
HR
3B

Sample Output 2

No

We have no H.

Input

题意翻译

有 $4$ 个字符串,每种字符串都是`H` , `2B` , `3B` , `HR` 中的一个。 判定这四个字符串中 `H` , `2B` , `3B` , `HR` 是否都出现了,且每个串都只出现了一次。

Output

分数:200分

问题描述

你将获得四个字符串$S_1$、$S_2$、$S_3$和$S_4$。确定这个字符串序列是否包含以下每种字符串:H2B3BHR。在这里,保证每个$S_i$是H2B3BHR

限制条件

  • 每个$S_i$是H2B3BHR

输入

从标准输入以以下格式获得输入:

$S_1$
$S_2$
$S_3$
$S_4$

输出

如果给定的字符串序列包含每种字符串H2B3BHR,打印Yes。否则,打印No


样例输入1

3B
HR
2B
H

样例输出1

Yes

我们拥有每种字符串H2B3BHR


样例输入2

2B
3B
HR
3B

样例输出2

No

我们没有H

加入题单

上一题 下一题 算法标签: