Solved with dijkstra (using bitmask). Got AC with 0.156.Farsan wrote:At first i tried bitmask DP but was getting RTE,may be pushing too much state on stack.Then tried dijkstra (using bitmask).Got AC,took time around 1.4s.
All about problems in Volume 6. If there is a thread about your problem, please use it. If not, create one with its number in the subject.
Moderator: Board moderators
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman