問題一覧 > 通常問題

No.1129 Rating Rock-Paper-Scissors

レベル : / AI推定難易度 : 115 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 244
作問者 : null / テスター : leafirby
お気に入りにしたユーザー ProblemId : 4825 / 自分の提出
問題文最終更新日: 2022-04-25 23:37:25
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. Back to the original

Problem Statement

Rating Rock-Paper-Scissors is a game played under the following rules.

  • $2$ players independently choose one of the hands Rock, Scissors, or Paper.
  • If the Rating values of the $2$ players are not equal, the player with the higher Rating is the winner.
  • If the Rating values of the $2$ players are equal and the hands played by the $2$ players are different, the winner of ordinary rock-paper-scissors is the winner.
  • If the Rating values of the $2$ players are equal and the hands played by the $2$ players are also the same, the game is a draw.
You are given null's Rating $A$ and rock-paper-scissors hand $B$, and tRue's Rating $C$ and rock-paper-scissors hand $D$. Output the winner. If the game is a draw, output Draw.
The rules of rock-paper-scissors follow the standard rules. (Wikipedia)

Constraints

  • $0 \le A,C \le 4000$
  • $0 \le B,D \le 2$
  • All inputs are integers.
  • For each of $B,D$, $0$ represents Rock, $1$ represents Scissors, and $2$ represents Paper.

Input

$A\ B\ C\ D$

Output

Output the winner. Specifically, output one of null, tRue, or Draw.
Print a newline at the end.

Sample

Sample 1
Input
688 0 1518 0
Output
tRue

Sample 2
Input
4000 1 4000 2
Output
null

Source

Beginners After Typhoon Contest#01: B - Rating Rock-Paper-Scissors
writer: null
tester: Nanashi, leafirby, QCFium
This problem was ported in accordance with HackerRank's terms. Some parts have been modified.

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