Problem 3108 · Hard

Minimum Cost Walk in Weighted Graph

Find the cheapest walk between queried vertices in a weighted graph, where a walk's cost is the bitwise AND of the edge weights it uses. The visual shows connected components and the AND masks along each path.

Open the interactive visualisation