[Community Puzzle] Rock Paper Scissors Lizard Spock

https://www.codingame.com/training/easy/rock-paper-scissors-lizard-spock

Send your feedback or ask for help here!

Created by @_Vincent,validated by @java_coffee_cup,@Niako and @helgui.
If you have any issues, feel free to ping them.

1 Like

It was a cool puzzle to solve. Thanks for the contribution :D.

1 Like

Okay. Starting to get irritated here as I don’t know what I’m doing wrong. I can get the solution but the server won’t accept it. I get this:

Standard Output Stream:

2
6 5 1

Failure

Found: 6 5 1
Expected: Nothing

Also, if I output to cerr, it is read as output to cout.

Could someone explain what’s going on here, please? :slight_smile:

did you add \n (newline) after 6 5 1 ?

Yes, I did. I’ve traced the error since your kind reply: my output had a trailing space after the final digit, which was apparently unacceptable. I’ve amended my code to produce spaces less indiscriminately and the code seems to work now.

Thank you for your help. :slight_smile:

i think after symbol 1 you have a symbol space (" "). there is shouldn’t be.
(Expected: Nothing)

I learned a lot from this exercise, thank you very much.

Hello,

Anyone’s having the last test failing?
My output is:
34
### Failure
Found:
45 262 229 823 283 152 24 228 360 124
Expected:
45 262 229 823 283 152 24 228 230 188

Can’t figure out what’s wrong :sob: :sob:

You should check your tie breaker conditions.

Here your output indicates player 34 won in semi-finals against player 360, but it was a game against player 230.

2 Likes

Thaaaaaanks!! Actually, it was an issue with my rules! I completely missed C against L…

1 Like

Nice one, thanks for taking the time to posting it :smile:

Hi, it’s a cool puzzle, thanks for posting it. But I have no clue how to start. Could anyone give a tiny hint please?
My first idea is how should we handle the random number of players. We know that the number of player in the current round is as half of the previous ones.

repeat halving number, process
until number equals 1

Continuing the discussion from [Community Puzzle] Rock Paper Scissors Lizard Spock:

Compiler here is Different ?
All Test Cases Passes
Except 50 % of Last Case
I mean
in last Case
the last 5 Rounds is Correct
But First 5 Rounds is Wrong
How And Why ? !
I don’t Know