| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 252 | 202 | 182 | 78.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:
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.
5 RRSSP SSSSS
victory
6 PRSRPS PSSPPR
defeat
University > Delft University of Technology > Freshmen Programming Contest 2024 D번