CSES - Minimum spanning tree

Consider the following undirected graph:

  • The nodes are 1,2,\dots,N and N=1000.
  • There is an edge between every pair of nodes. The weight of the edge between the nodes a and b is \min(a,b).

What is the weight of the minimum spanning tree?

Justify your answer briefly: