There is a display of NxN (N<=90) pixels with some blocked pixels and a snake of width = 1 pixel and variable length and two players A and B play a game.The game proceeds as follows -
The list of blocked pixels is given to you.
Initially the length of the snake is 1 pixel i.e. it occupies only one pixel from the NxN pixels.
I need to know for each unblocked pixel, who will win the game if Player A starts the game by putting the snake on this particular pixel initially.
I tried reducing the problem to apply the Sprague-Grundy theorem but made no progress as the size of the display is too large (90x90) So, calculating the Grundy values for each state isn't computationally feasible.
Can someone suggest a solution which works for the given dimensions of the display?