| ||||||||||
Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
做了一晚上带一上午才过了这题。给大家个经验。陷阱就是如果有负环 还要检测负环是否能够抵达n点 我的方法 是先传递闭包生成v[][]。 判断n点从1可不可达,不可达直接不行 然后用bellman 判断,如果有负环,查一下表v[][],看能否到n点即可。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator