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

Re:这种算法对吗?(AC啦,自己顶一下)

Posted by msclub_acm_13 at 2008-04-20 14:18:26 on Problem 1718 and last updated at 2008-04-20 14:19:07
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:
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