×

# Wrong submission for Mix Mix Game

 0 For August LunchTime Mix Mix Game(https://www.codechef.com/LTIME63B/problems/JAGAM) After seeing the editorial explanation, my approach was to find if for first turn check if adding or subtracting of a number leads to z1 or z2 if so, player 1 wins for second turn, choose a pair of number from the array, say "a" and "b" calculate a+b, a-b, -a+b, -a-b check if any one of them is equal to z1 or z2 if so, then second player wins Else tie Here I have implemented my logic. Where am I doing wrong? asked 27 Aug '18, 18:59 3●1 accept rate: 0%

 0 I didn't read code, but with given explanation, this should be wrong case for your appraoch: $n=2, Z_1=5, Z_2=5$ $A$={$2, 3$} In this case answer is Tie: first player can put $-3$ and copy next moves of second player. answered 27 Aug '18, 19:48 116●4 accept rate: 33% Because of my wrong interpretation, I had a series of wrong submission XD. Thanks man, you saved my day. (27 Aug '18, 21:51)
 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:

×3,704
×1,901
×524
×5

question asked: 27 Aug '18, 18:59

question was seen: 180 times

last updated: 27 Aug '18, 18:59