Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

解释题意

Posted by 278466061 at 2015-02-14 20:15:33 on Problem 1097
此题虽不水,但是也没多难,只是略繁琐,相信很多人是被题意恶心到了,我来解释一下:
 City X is put on the sign if the sign is on a road such that the shortest path from the intersection immediately preceding the sign to X uses the road 
这到底说了啥?

我们知道,按照题意,一个sign S有一个起始的intersection i1和一个结束的intersection i2,这个sign在i1和i2之间;另外,任何一个城市X一定是在某个intersection i3处。那么什么时候城市X会标记在sign S之上呢?注意:就是i1到i3的最短路径包含i2的时候!通俗来说就是一个人开车从i1到城市X(i3),他一定会选择最短的路径,而一旦这个路径包含i2他就一定要走向i2,也就一定会看到这个sign S,那么S是有必要显示X的。
举sample中例子:第0个sign包含城市Charlestown(第6个intersection i6),也就是说从i0到i6的最短路径一定包含了i3(这个sign是从i0到i3之间的)。

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator