URAL 2005. Taxi for Programmers (最短路 数学啊)

The clock shows 11:30 PM. The sports programmers of the institute of maths and computer science have just finished their training. The exhausted students gloomily leave their computers. But there’s something that cheers them up: Misha, the kind coach is ready to give all of them a lift home in his brand new car. Fortunately, there are no traffic jams on the road. Unfortunately, all students live in different districts. As Misha is a programmer, he highlighted and indexed five key points on the map of Yekaterinburg: the practice room (1), Kirill’s home (2), Ilya’s home (3), Pasha’s and Oleg’s home (4; they live close to each other) and his own home (5). Now he has to find the optimal path. The path should start at point 1, end at point 5 and have minimum length. Moreover, Ilya doesn’t want to be the last student to get home, so point 3 can’t be fourth in the path.

,君子无故,玉不去身。

URAL 2005. Taxi for Programmers (最短路 数学啊)

相关文章:

你感兴趣的文章:

标签云: