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 |
感谢ImLazy大牛的启示!1.枚举4个数在24种排列下的不同值,总共43680个,不算多; 2.排序; 3.合并相同值且没有重复的组合为8个数的组合,合并的过程中计数。这样就得到了每8个数且能平衡的组合个数; 4.对每种八个数的组合,用1111111111111111去减,检索另八个数的组合个数,相乘计入总数。 注意别重复计数即可。 ps,本来我的思路也是枚举所有八个数的组合,再对八个数求可行的组合数,很荣幸~~D Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator