Logo
(追記) (追記ここまで)

32587번 - Dragged-out Duel 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB25220218278.788%

문제

Your friend Guile and you have decided to spend an afternoon playing the new Street Fighter game, but you both want to start on the left, because you have both only practiced all your combos starting from the left. You decide to determine who starts on the left like true men -- with an intense grueling, and exhausting duel of rock-paper-scissors.

The duel will be a best-of-$n,ドル consisting of $n$ single rounds of rock-paper-scissors (yes, you may have to play rock-paper-scissors ten thousand times, truly a war of attrition), and whoever wins more rounds, gets to start on the left. If you both pick the same option in an individual game, it is not replayed. To keep track of who wins, you decide to write a program, that determines whether you beat Guile in this great duel.

As a reminder: rock beats scissors, scissors beats paper, paper beats rock. If you both make the same choice, the round is a draw.

입력

The input consists of:

  • One line with a single integer $n$ (1ドル\leq n\leq 10,000円$), the number of individual games.
  • Two lines with $n$ characters, each character being either 'R' for rock, 'P' for paper, or 'S' for scissors. The first line represents your choices in each round, and the second line represents Guile's choices in each round.

출력

If you have won the most rounds of rock-paper-scissors, output "victory". If Guile has won the most rounds of rock-paper-scissors, output "defeat".

It is guaranteed that the both of you will not have the same number of wins.

제한

예제 입력 1

5
RRSSP
SSSSS

예제 출력 1

victory

예제 입력 2

6
PRSRPS
PSSPPR

예제 출력 2

defeat

힌트

출처

University > Delft University of Technology > Freshmen Programming Contest 2024 D번

  • 문제를 만든 사람: Wietze Koops
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /