#abc263a. A - Full House
A - Full House
Score : points
问题描述
我们有五张卡片,每张卡片上分别写着整数 、、、 和 。
如果满足以下条件,则称这一组五张卡片为“葫芦”(Full house):
- 这组卡片中有三张卡片上的数字相同,另外两张卡片上的数字也相同。
请确定这组卡片是否为“葫芦”。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
We have five cards with integers , , , , and written on them, one on each card.
This set of five cards is called a Full house if and only if the following condition is satisfied:
- the set has three cards with a same number written on them, and two cards with another same number written on them.
Determine whether the set is a Full house.
Constraints
- Not all of , , , , and are the same.
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
If the set is a Full house, print Yes
; otherwise, print No
.
Sample Input 1
1 2 1 2 1
Sample Output 1
Yes
The set has three cards with written on them and two cards with written on them, so it is a Full house.
Sample Input 2
12 12 11 1 2
Sample Output 2
No
The condition is not satisfied.
update @ 2024/3/10 11:07:09