| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 (추가 시간 없음) | 2048 MB | 37 | 10 | 9 | 31.034% |
This is an interactive run-thrice problem.
Your task is to develop a strategy that guarantees you win at Rock, Paper, Scissors every time. Yes, you heard that right --- and there's no trickery involved!
Now, let me quickly recap the rules for those who might not be familiar. In this game, two players each select one of three symbols: rock, paper, or scissors. The hierarchy is simple: rock crushes scissors, paper covers rock, and scissors cut paper. If both players choose the same symbol, the round results in a draw.
In this contest, you will face off in three separate games, with each game consisting of 20ドル$ rounds. To emerge victorious in a game, you must win more rounds than you lose. Your ultimate goal is to win at least two out of the three games.
Are you ready to take on the challenge? Good luck!
...And don't forget to check out the next section; it'll give you insight into your opponent.
The program will run 3ドル$ times.
For each run, you are required to output 20ドル$ lines, with each line specifying your chosen symbol: R (for rock), P (for paper), or S (for scissors).
After each of your outputs, the jury's program will respond with the outcome for that round: W if you win, L if you lose, and D if it's a draw.
In the first game, the jury will employ a predefined strategy (defined secretly in the test) that does not rely on your choices.
In the second and third runs, for each round $i$ (from 1ドル$ to 20ドル$), the jury's program will use the symbol that would have beaten your symbol from round $i$ in the previous game (run). In other words, if you played R in round $i$ of the first game, the jury will choose P in round $i$ of the second game, since paper beats rock.
There are 100ドル$ test cases for this problem.
D L W D L
R R R R R
W W W W W
S S S S S
W W W W W
P P P P P
The examples illustrate the first five moves only instead of twenty moves.