Problem 3786 · Hard
Measure the path length between every pair of nodes that share a group label and add the lengths up.
Open the interactive visualisation