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.
For each server, count the servers in each branch whose path weight divides the signal speed, then pair servers from different branches.