Rock Paper Scissors
There are $N$ players standing in a line, indexed $1$ to $N$ from left to right. They all play a game of Rock, Paper, Scissors. Each player has already decided which move they want to play. You are given this information as a string $S$ of length $N$, i.e, - $S_i$ is equal to $\verb+R+$ if player $i$ will play Rock. - $S_i$ is equal to $\verb+P+$ if player $i$ will play Paper. - $S_i$ is equal to
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start