Problem 3879 · Hard
Grow simple paths from every node, refuse any path that repeats a value, and keep the largest sum.
Open the interactive visualisation