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 |
Re:我的质疑In Reply To:我的质疑 Posted by:Snow_storm at 2010-10-15 01:08:08 > 如果单单是作1~N的最短路 是否漏掉了不可达点?如此-1的情况是否就遗漏了? 而且会错误的 输出dis[N],同时-2的判断也会有问题。 > 所以我认为还是应该加入一个特殊源点V0,用来保证所有点可达,从而不会漏掉无解-1的情况。同时判断-2时,应改为如果 dis[1] == inf || dis[n]==inf 即为-2 否则 输出dis[n]-dis[1] Nice~ Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator