uva 11492 - Dijkstra with an extra dimension