Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
烷醛混AC的列出前六个: 0,0,1,2,4,6 首先很容易把上下界都是O(n^2)算出来,然后就插值试试吧,结果发现前六个根本不符合二次多项式,所以就试着奇偶分开插值,0,1,4(很明显是平方),和0,2,6(明显是前n/2个数之和),就对了 然而不是测试样例给出了的话n=6我以为是7啊。。。貌似可以证明7是最小值,大家来看看? 由对称性不妨设第一步移动的是1和2,然后剩下的问题就化为了3,4,5,6变成6,5,4,3,由逆序對至少6次,所以总共7次 哪里有问题呢? Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator