| ||||||||||
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 |
不明白该如何用逆序数去表示状态,把每个数的逆序数求出来然后该怎么办呢?In Reply To:是一定的,8数码只有9!个状态.362880个状态..这个题预处理一次算完.. Posted by:sunny_fable at 2007-07-27 20:05:49 比如1 2 3 4 5 6 7 9 8 这个状态的逆序数是1, 而1 2 3 4 5 6 8 7 9 这个状态的逆序数也是1.那具体怎么表示还是不太明白,能指点一下吗?谢谢大牛了。最好附个例子。^_^ Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator