ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Фёдор Меньшиков. Тренировки > задача:


50832 - Rock Paper Scissors Lizard Spock

Гость
• Вопросы к жюри (2)

Задачи сборника

• 50871 - Harmonic Mean
• 50859 - Low performance
• 50508 - The Biggest Area
• 50528 - Rock-Scissors-Paper
• 50744 - The Smallest Perimeter
• 50808 - Total Distance Traveled
• 50814 - Buying Books from Internet
• 50812 - Total Discount for the clients
• 50832 - Rock Paper Scissors Liz...
• 51078 - Max trade
• 51077 - Grades Histogram
• 51046 - The biggest number
• 50867 - Average of the Best Grades
• Reflektimi i pikes
• 50994 - The Most Crowded Station
• 51194 - The difference between max...
• 001. 50385 - From m to n

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

Rock Paper Scissors Lizard Spock

You know the famous game: Rock Paper Scissors. There is an extension of it: Rock Paper Scissors Lizard Spock. In which the rules are similar. Any of the five can win or lose against other four as seen in image on the right.

Question: Write a program that is going read n games between two people, and show the winner.
Note: If the two players show the same hand, they both take 0.

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 strings.

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

  • 1: if the first player wins
  • 2: if the second player wins
  • Tie: if they have the same score

Sample Input I
3
Rock Paper
Lizard Rock
Spock Scissors
Sample Output I
1 2
2

Explanation:

  1. Paper covers Rock
  2. Rock crushes Lizard
  3. Spock smashes Scissors



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

www.contester.ru