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.

Moderator: Board moderators
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.