[ACM-ICPC] 5862 - City Travel
We have n cities that are connected by m bi-direction roads. Each
city has a unique id from 1 to n, so we have cities
c1,..., cn. Let rij be the road connecting two cities ci and cj,
then rij has a length lij and condition dij, where the
length is a positive integer and ...