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 |
把已有通路的值改为0,就可以轻松避开Q条路径有环的问题一开始为了容易区分,把已有通路的值赋为-1,结果发现Q条路径可能有环,应付起来比较不简便,所以直接改成0,能够巧妙解决。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator