Time Limit: 1000 mSec
Memory Limit: 32768 KB
As the Chairman of Association of Campus Mice (ACM), FatMouse is going out of his office to tour his kingdom. But with the International Cat Patrol Centers (ICPC) locating at every street, he has to carefully plan his trip so that it requires minimum time to visit everyone living at every street.
Assume that there are mice living at both sides of each street, yet FatMouse can only visit one side of a street in a single pass. He can turn any direction (including a U-turn) at any intersection, and can turn around at the end of any street. He goes at 20 km/h when visiting his people on the way (shaking hands and saying "hi"), and 50 km/h when passing a visited side of a street (since the cats must be awake by then).