[Graphs] Snake mask

Правка en1, от calmhandtitan, 2015-07-22 09:01:44

From quite a long time I was trying to solve this problem 225D - Snake, but I am stuck on how to create a mask for this snake and how to extract information from the mask for doing further BFS.

I referred to I_love_Tanya_Romanova's solution 4086309 for the same, but was unable to understand the magic behind his mask.

So can someone help me understanding how to create mask for this problem.

Many others have used a hash function to solve this problem. I wonder how?

Теги bfs, bitmask, graph

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский calmhandtitan 2015-07-22 10:47:09 0 (published)
en1 Английский calmhandtitan 2015-07-22 09:01:44 532 Initial revision (saved to drafts)