DAG single source shortest path problem.
Build the graph per normal and add one more time constraint to each edge in order to determine whether that edge is still viable given an arrival time at that node.
Passed sample IO as well as some IO on OJ Board. Not sure what is wrong now.
No point fixing as the whole point of the problem seems to be DAG SSSP.
DAG single source shortest path problem. Build the graph per normal and add one more time constraint to each edge in order to determine whether that edge is still viable given an arrival time at that node. Passed sample IO as well as some IO on OJ Board. Not sure what is wrong now. No point fixing as the whole point of the problem seems to be DAG SSSP.