/
実行時間制限: 2 sec / メモリ制限: 1024 MiB
配点 : 200 点
問題文
4 つの文字列 S_1, S_2, S_3, S_4 が与えられます。
この中に、H , 2B , 3B , HR がそれぞれ 1 つずつあるか判定してください。
ただし、全ての S_i は H , 2B , 3B , HR のいずれかと一致します。
制約
- S_i は
H,2B,3B,HRのいずれかと一致する
入力
入力は以下の形式で標準入力から与えられる。
S_1 S_2 S_3 S_4
出力
H , 2B , 3B , HR がそれぞれ 1 つずつあるならば Yes と出力せよ。
そうでないならば No と出力せよ。
入力例 1
3B HR 2B H
出力例 1
Yes
H , 2B , 3B , HR がそれぞれ 1 つずつあります。
入力例 2
2B 3B HR 3B
出力例 2
No
H がありません。
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, orHR.
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.