[D2] Dijkstra for longest paths (1pt) [00NU]

What happens if we replace the word “smallest” in Dijkstra’s algorithm with the word “biggest”—that is, we use a max priority queue so we pull out the vertex u with the maximum distance on each iteration, and for each edge (u,v) we update d[v] to be the maximum of d[v] and the sum d[u] + w_{uv}. Can we use this modified Dijkstra’s algorithm to find longest paths bewteen nodes in any graph without directed cycles? Prove that this works, or give a counterexample (with explanation) where it doesn’t.