You are not logged in. Please login at to post your questions!


Wrong submission for Mix Mix Game

For August LunchTime Mix Mix Game(

After seeing the editorial explanation, my approach was to find if

  1. for first turn check if adding or subtracting of a number leads to z1 or z2
    • if so, player 1 wins
  2. 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
  3. Else tie

Here I have implemented my logic. Where am I doing wrong?

asked 27 Aug '18, 18:59

ujjaldas1997's gravatar image

accept rate: 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

allllekssssa's gravatar image

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) ujjaldas19972★
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • 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:


question asked: 27 Aug '18, 18:59

question was seen: 180 times

last updated: 27 Aug '18, 18:59