Problem 3067 · Medium

Count Pairs of Connectable Servers in a Weighted Tree Network

For each server, count the servers in each branch whose path weight divides the signal speed, then pair servers from different branches.

Open the interactive visualisation