問題一覧 > 通常問題

No.1699 Unfair RPS

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 336
作問者 : harurun / テスター : tnodino
お気に入りにしたユーザー ProblemId : 6993 / 自分の提出
問題文最終更新日: 2021-09-14 13:07:31
Unfair RPS
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Show the original
yukicoder contest 317 (順位表) の他の問題:

Problem Statement

A, B, and C play rock-paper-scissors.

Through precognition, A knows the hands that B and C will play next.

Determine whether A can beat B and C simultaneously.

Print Yes if A can beat them simultaneously, and No if A cannot.

Input

$b\ c$

The hands $b\ c$ of B and C are given, separated by a space.

Here, $0$ represents rock, $1$ represents paper, and $2$ represents scissors.

Constraints

  • $0≤b,c≤2$

  • All inputs are integers.

Output

Print the answer on one line. Print a newline at the end.

Sample

Sample 1
Input
1 2
Output
No

B plays paper and C plays scissors, so there is no hand that beats both simultaneously.

Sample 2
Input
0 0
Output
Yes

If A plays scissors, A can win against both simultaneously.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。