HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Ad-Hoc > problem:


50528 - Rock-Scissors-Paper

Guest
• Review clarifications (2)

Section problems

• 50371 - Modified Karnaugh-Map
• 50406 - Draw Pattern 178
• 50416 - Placing Dominoes on Chess...
• 50477 - Character Pyramids
• 50498 - K-Means
• 50505 - kht Puzzle
• 50346 - The Biggest Date
• 50512 - Coding redundancy
• 50528 - Rock-Scissors-Paper
• 50493 - n-digit kth Prime Number
• 50520 - Filling a Matrix Randomly
• 50454 - What day is it?
• 50474 - Sum of Two Primes
• 50597 - Drawing Diamonds
• 50253 - Timer
• 50294 - Centimeters to Yards
• 50303 - Pattern

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

Rock-Scissors-Paper

Rock-Scissors-Paper is a hand game usually played between two people. The two players forms one of the three possible shapes simultaneously. If both sides have the same shape. The game is tie. There are three possible outcomes otherwise:

  • Rock crushes scissors
  • Paper covers rock
  • Scissors cut paper.
Note: If they are the same, they don't get any points.

Question: You are given n sequences of shapes. Find the winner.

Input specification
You will be given an integer (n) the number of plays where 0 ≤ n ≤ 1000. Then, in the following n lines, you will be given two of the strings: Rock, Paper, Scissors.

Output specification
Show the score in the first line. Then, show one of the messages:

  • The first player wins
  • The second player wins
  • Tie

Sample Input I
3
Rock Paper
Scissors Rock
Scissors Paper

Sample Output I
1 2
The second player wins



Для отправки решений необходимо выполнить вход.

www.contester.ru