×

# BUDDYNIM(SNCKPE19) huge error.

 7 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! asked 04 Nov, 00:40 151●6 accept rate: 0%

 3 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 :( answered 04 Nov, 00:49 2.4k●4●20 accept rate: 17% 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. (04 Nov, 00:55)
 2 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 answered 04 Nov, 00:54 51●4 accept rate: 0%
 1 I am supposing that Bob win if and only if sorted(a) == sorted(b). But this solution has got WA. Am I right? answered 04 Nov, 03:21 126●3 accept rate: 7% 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 (04 Nov, 07:42) divik5444★
 1 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. answered 04 Nov, 03:53 126●3 accept rate: 7%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×587
×52
×13