Please Help : IDA* search problem

Revision en3, by Secret.Codes, 2018-01-05 03:19:21

I know the basic of IDA* search, heuristic function etc. . But I can not solve this problem of lightoj . http://lightoj.com/volume_showproblem.php?problem=1121&language=english&type=pdf . here time limit is 2.00 second and Memory limit is 32 MB . But there are also a same problem on UVa online judge . . https://uva.onlinejudge.org/external/101/10181.pdf . It's time limit is 15.00 seconds. I can solve this in .750 second. . But in lightoj time complexity is very tight so I am getting TLE everytime.

My code for Lightoj problem is . https://pastebin.com/QSCXhSMp . Where is the problem?? I think on lightoj there are many(100) test cases . So i need to optimize it . How to optimize ??

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English Secret.Codes 2018-01-05 04:28:28 157
en3 English Secret.Codes 2018-01-05 03:19:21 16 Tiny change: 'tebin.com/Znuybnbi\n.\nWhere' -> 'tebin.com/QSCXhSMp\n.\nWhere'
en2 English Secret.Codes 2018-01-05 02:58:36 4 Tiny change: '.\n.\nBut the in light' -> '.\n.\nBut in light'
en1 English Secret.Codes 2018-01-05 02:57:20 753 Initial revision (published)