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

做的真是辛苦,看了下别人的预处理算法,很妙。

Posted by msclub_acm_13 at 2008-04-02 17:11:12 on Problem 1037
预处理: 
        F(n,k)  代表W形的以k开始的planks数目为n的Fence 
        G(n,k)  代表M形的以k开始的planks数目为n的Fence 
        
        F(n,k) = sigma(G(n-1, i)) (1 <= i <= k-1)
        G(n,k) = sigma(F(n-1, i)) (k <= i <= n-1)
        F(1,1) = G(1,1) = 1;
        G(n,k) = F(n,k) = 0 (k > 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