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

33308번 - Rock, Paper, Scissors 다국어투 스텝

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 2048 MB3710931.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.

예제 입력 1

D
L
W
D
L

예제 출력 1

R
R
R
R
R

예제 입력 2

W
W
W
W
W

예제 출력 2

S
S
S
S
S

예제 입력 3

W
W
W
W
W

예제 출력 3

P
P
P
P
P

노트

The examples illustrate the first five moves only instead of twenty moves.

출처

Camp > Petrozavodsk Programming Camp > Summer 2024 > Day 6: Nyatl’s Game Contest G번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

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

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