54 人解决,69 人已尝试。
72 份提交通过,共有 357 份提交。
4.2 EMB 奖励。
单点时限: 2.5 sec
内存限制: 512 MB
EOJ Delivery Service Company handles a massive amount of orders in our nation. As is well known, our nation has
Now, you, as the headquarter of EOJ, has somehow learned a magic spell. Each time you cast a spell on two paths, the lengths of these two paths magically swap with each other. You can do this magic as many times as you want (possibly none).
We have
The first line of the input contains one single integer
The next
The next line contains one integer
The next
Output one integer, the minimum total time you can achieve.
5 1 2 2 1 3 3 3 4 3 3 5 4 2 1 5 4 2
14
In the example, we swap the weights between edge
54 人解决,69 人已尝试。
72 份提交通过,共有 357 份提交。
4.2 EMB 奖励。