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 |
哦! 想到了, 起始状态到目标状态应该是一个偶置换, 因为每一步移动是一个偶置换! 所以只需要判断起始->目标这个置换的奇偶性就可以了,不用求逆序数 :> O(N)即可!In Reply To:这个题目怎么做 Posted by:hawk at 2003-11-13 16:34:03 > 哪有介绍? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator