ambiguity in question??

Hi,In the stone game i can find an ambiguity. The question given is the player can select any pile but in the sample input there is no provision for the player to select the pile. So please clarify it

Kindly add a link to the problem statement whenever you are referring to some particular problem.

1 Like

I don’t see any ambiguity in the input it is in conformance with the description in the problem statement. You are given a set of n piles and number of stones in each pile and this exactly is what is given in the sample input.

For instance you have five piles and pile1 has 5 stones pile2 has 6 stones pile3 has 4 stones pile4 has 8 stones and pile5 has 10 stones the test case would be.

5
5 6 4 8 10

There will be T such test cases in the input.

If by provision you mean a scheme to remove the piles then there so such scheme given in the question. You have to find out if the players always play optimally i.e., each player will always try to win who will eventually win Alice or Bob.

Could you please explain what do you mean by provision to select the pile so that I can update the answer with more detail.

I think there is one tiny problem in statement, maybe this is the ambiguity - there is no turn for 1 1 and in statement there is The player who plays last wins the game. (in this case no-one is a winner)…

@betlista The first player can make the move of removing 1 stone from pile 1. The second player will not have any moves and first player wins.

1 Like

of course you are correct :wink:

Thank u very much for clearing my doubt.Now I understood

//