Secret.Codes's blog

By Secret.Codes, history, 6 years ago, In English

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. . I have used manhatton distance here as heuristic. . My code for Lightoj problem is . https://pastebin.com/QSCXhSMp . I have also tried manhatton distance with linear conflict as heuristic but could not get accepted !! Where is the problem?? I think on lightoj there are many(100) test cases . So i need to optimize it . How to optimize ??

  • Vote: I like it
  • 0
  • Vote: I do not like it