Two Random AC codes giving different answers for BUDDYNIM! No offence to the code owners, but it took almost two hours of my team to reach to a verdict for a test case of this question.
The test case:
1
2 2
1 2
4 7
gives answer as “Alice” in one of the codes and “Bob” in the other. I wonder what is the correct answer because both of those codes have almost no relation in between, and this resulted in our WA with lots of time wasted too.
We checked the codes of two random people and with no offence to them, I’m posting the links to the codes for verification from your side.
https://www.codechef.com/viewsolution/21410432
https://www.codechef.com/viewsolution/21414182
Thank You!
7 Likes
Correct answer is Alice since she can choose table 2 and keep decrementing by 1 and Bob will run out of moves. I guess test cases were weak
3 Likes
Yes,true! One of the solution is not even passing the given testcases and it is there in successful ones. It is nothing but just a random brute force! This was the first question of the pre-elimination and that too with such weak testcases. Pathetic!
Solution Link - https://www.codechef.com/viewsolution/21419745
Expected Ans -
Alice
Alice
Bob
Ans by this solution -
Alice
Bob
Bob
I completely agree with you!These two solutions are giving diff. answers! @include_sajal
Kindly look into this matter! @mgch @kingofnumbers
2 Likes
Yeah, absolutely correct, I had the same in mind, but was totally confused after seeing the answer as “Bob” in one of the codes. Test cases were not just weak, they were a blunder, as I just saw an AC code giving wrong answer for sample test case only.
I am supposing that Bob win if and only if sorted(a) == sorted(b). But this solution has got WA.
Am I right?
1 Like
As it has turned out there are possible piles consist of zero items! Pretty logic. Childlike catch.
If I could got AC for this task then I’d qualified for next round. But with such tasks maybe it is better for my calmness that I did not.
1 Like
I got my solution accepted using the same logic. Don’t forget to remove 0’s from the inputs.
0 0
0 0 0
Answer should be Bob not Alice