Help in a Topcoder Problem ChessMetric — 2003 TCC Round 4

Правка en1, от hell_hacker, 2016-08-21 13:25:29

My approach for ChessMetric is to find all the positions reachable from position start, then put them in a queue of tuples where first and second elements are the co-ordinates and the third is number of moves. But it is giving Memory limit exceeded. Any idea how to make this efficient? I used unsigned short int for co-ordinates and number of moves.

Thank You.

Теги dp

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский hell_hacker 2016-08-21 13:25:29 495 Initial revision (published)