1.求子序列包含1到n的全排列的数列的长度的最小值
https://ipsc.ksp.sk/2013/problems D和R
https://ipsc.ksp.sk/2013/real/solutions/booklet.pdf
是open question
有一种构造n^2-2n+4
n=1,ans=1,a[1]=1;
n=2,ans=3,a[1]=1,a[2]=2,a[3]=1;
n=3,ans=7,a[]=1,2,1,3,1,2,1;
n=4,ans=12,a[]=1,2,3,4,1,2,3,1,4,2,1,3;
n=5,ans=19,a[]=1,5,2,3,4,5,1,2,3,5,4,1,2,5,3,4,1,5,2;