Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

感谢ImLazy大牛的启示!

Posted by DongSJ at 2011-09-01 00:36:21 on Problem 3139
1.枚举4个数在24种排列下的不同值,总共43680个,不算多;
2.排序;
3.合并相同值且没有重复的组合为8个数的组合,合并的过程中计数。这样就得到了每8个数且能平衡的组合个数;
4.对每种八个数的组合,用1111111111111111去减,检索另八个数的组合个数,相乘计入总数。
注意别重复计数即可。
ps,本来我的思路也是枚举所有八个数的组合,再对八个数求可行的组合数,很荣幸~~D

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator