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:大家都试试这个数据

Posted by temp_ptr at 2011-10-07 14:30:50 on Problem 1952
In Reply To:WA的人来看看这组简单数据 Posted by:temp_ptr at 2011-10-07 14:19:34
else if(a[i] == a[j])//key point!
{
    if(dp_len[i] == 1)//这个可以理解,如果从i到j之间都没有比a[i]小的,
        dp_time[i] = 0;//而a[i]==a[j],那么后面降序列情况肯定一样,不能重复计数
    break;//我觉得这个break最难理解,为什么可以break,我想了1小时都没深入理解,只有模糊感觉,反复步进调试跟了很久代码,构造出了上面那个特例,4 3  4 1 3 1,和 4 3 2 4 3 1
}

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