| acmsguru |
|---|
| Закончено |
.
.
becomes less and the total cost of replacing these cables is minimal. Note that in this problem you do not have to minimize
, but you should make it less than its initial value. sample input | sample output |
4 1 2 3 3 1 3 8 33 1 4 3 7 | 10 2 1 3 |
sample input | sample output |
4 1 2 3 5 2 3 5 2 3 4 5 4 | 2 1 2 |
| Название |
|---|


