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 zuqiuxiaozi0402 at 2009-04-09 21:38:15 on Problem 1989
In Reply To:根据前人所授,再述规律。 Posted by:liuyuquan100 at 2009-03-08 15:02:14
> 假设有排序的个数为n,则其最短的非子序长度,可由下面方法求得。
> 
> 如果存在其有包括全排序的一个最小组合,(1,2,...n),(次序不限,只要有1...n的数字就行了,也有可能有重复数字)
> 
> 找到其所有这样组合。可合成()()()...()[],( 设有k个括号,[]里的元素可能为空)
> 则其最短的非子序长度为k+1;
> 原因:
> 长度为k的子序,都可由前k个括号里抽出一个数组成。
> 但对于k+1,就找不到一个组合,因为最后一个组合里少了需要的最后一个数。 
> 
> 如本例子中:
> 14 5
> 1
> 5
> 3
> 2
> 5
> 1
> 3
> 4
> 4
> 2
> 5
> 1
> 2
> 3
> 
> 首先有(1,5,3,2,5,1,3,4)(4,2,5,1,2,3)[]
> 故其最短非子序长度为3;
> 
> 
> 

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