### JeevanJyot's blog

By JeevanJyot, 2 months ago,

We invite you to participate in CodeChef’s Starters 51, this Wednesday, 10th August, rated for Div 2, 3 & 4 participants.

Time: 8 PM — 11:00 PM IST

Joining us on the problem setting panel are:

The video editorials of the problems will be available on our YouTube channel as soon as the contest ends. Subscribe to get notifications about our new editorials.

Also, if you have some original and engaging problem ideas and are interested in them being used in CodeChef's contests, you can share them here.

Hope to see you participating. Good Luck!

• +34

 » 2 months ago, # |   +3 Reminder: Contest starts in 20 mins.
•  » » 2 months ago, # ^ |   -23 Reminder: repair your servers
 » 2 months ago, # |   +10 Hint for Chef and Cook game???
•  » » 2 months ago, # ^ | ← Rev. 2 →   0 Reducible to NIM game...A[i] elements at index 'i' have distance N — i from the end of the array ,which is equivalen to having N-i stones in a NIM pile..
•  » » » 2 months ago, # ^ | ← Rev. 3 →   0 Can you explain this factA[i] elements at index 'i' have distance N — i from the end of the array ,which is equivalent to having N-i stones in a NIM pile..a bit more..
•  » » » » 2 months ago, # ^ |   0 If you are familiar with NIM game(Sprague grundy theorum)..WLOG consider A[i] = 0 or A[i] = 1.(binary array)...If A[i] = 1..This element can be moved to any index j>i and j<=N. You can perform a move on this element till its index becomes N. In other words the value of N — i can be decreased by any amount just like game of NIM.This can be extended to any array A .. by transforming A[i] = A[i]%2 since x^x = 0 and the parity of A[i] only matters.
•  » » 2 months ago, # ^ |   +5 Short solution outlineWe can biject this game to the normal nim game. For each $i$, we will create $A_i$ piles of $N-i$ stones.You can also have a look at the complete editorial.