#abc211b. B - Cycle Hit
B - Cycle Hit
Score : points
问题描述
你将得到四个字符串 , , 和 。
判断这一串字符串是否恰好包含一个 H
、一个 2B
、一个 3B
以及一个 HR
。
这里保证每个 都是 H
、2B
、3B
或 HR
。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given four strings , , , and .
Determine whether this sequence of strings has one of each of the following: H
, 2B
, 3B
, and HR
.
Here, it is guaranteed that every is H
, 2B
, 3B
, or HR
.
Constraints
- Each is
H
,2B
,3B
, orHR
.
Input
Input is given from Standard Input in the following format:
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
.
update @ 2024/3/10 09:25:36