#P9488. ZHY 的生成树
ZHY 的生成树
Problem Description
ZHY has a complete graph with vertices. The distance (edge weight) between vertex and vertex is . Find the sum of edge weights of the maximum spanning tree of this complete graph.
Input Format
A positive integer .
Output Format
An integer, representing the sum of edge weights of the maximum spanning tree.
4
4
30
183
100
1916
Hint
This problem uses bundled testdata.
(10pts): .
(20pts): .
(30pts): .
(40pts): .
For all testdata, .
Translated by ChatGPT 5