[Community Puzzle] 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.


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:

6 5 1


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.


Anyone’s having the last test failing?
My output is:
### Failure
45 262 229 823 283 152 24 228 360 124
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.


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

I’m a bit confused, I finished all the tests but Test 2 turns red after submitting it. It’s says something about hard coding, but I haven’t hardcoded anything other than the relation between signs (which is a constant and it would actually be a mistake to not hardcode it). I believe I encountered a bug in the validator 2 which gets triggered by something in my algorithm. Can anybody check that? many thanks.

The validators are different from the IDE’s tests to avoid hard-coded solutions, but this does not mean that a hard-coded solution is the only way to fail on them. Your solution probably don’t handle a peculiar case that happen in the validator.

1 Like

So what you are saying is that I failed to satisfy a non explicit requirement. This is called bad task description or bug in the validator.

No, the task is written in the statement.
BlaisEbuth just wrote that the validators are not the test-cases you can read.

1 Like

I figured it out, then I realized player numbers can be 2 digits. UGHHHH lol.

And i found it. Just needed to index the first space in my string to get the player number :smiley:

great Puzzle. Kind of hard but i like it :slight_smile:
I have made my code that can find the winner. I didn’t see that i had to output who the winner meet. And i cant figure out to get started with this.
I can after i have found the winner play the full game again and save the competitors the winner meets. But that seems like a stupid plan.

Any design ideas here ? Or is that not ok to write. Sorry im pretty new here :slight_smile: