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

注意有0的情况

Posted by Belldandy at 2013-10-28 11:05:52 on Problem 2033
重点部分:
if('0'==string[i])
{
    dp[i]=0;
}
else
{
    dp[i]=dp[i-1];
    if ('1'==string[i]||('2'==string[i]&&'7'>string[i+1]))
    {
        dp[i]+=dp[i-2];
    }
}

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