ACM ICPC World Finals 2008

Problem K: Steam Roller

This problem can be solved using Dijkstra’s algorithm. The graph in which we’re interested has as vertices fourtuples (r, c, α, d), where