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:这种算法对吗?(AC啦,自己顶一下)In Reply To:这种算法对吗? Posted by:msclub_acm_13 at 2008-04-11 23:36:48 > 先对所有a+b求最大公约数,得到最大时间t1。然后在这段时间内做DP (a[t][i]代表t时刻i地址是否可达),每次检查a[t-1][j](0<=i-5<=j<=i-1)是否可达,有一个可达则a[t][i]可达。 > 请高人赐教啊,WA了好多次了。。。 呵呵,终于AC了,忘了考虑跳过了桥墩可以跳回来,所以条件要改为: (0<=i-5<=j<=i+5<=n) Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator