Help in a Topcoder Problem ChessMetric — 2003 TCC Round 4

Revision en1, by 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.

Tags dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English hell_hacker 2016-08-21 13:25:29 495 Initial revision (published)