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 |
一个思路开一个数组bin[k] 初始时bin[i] <- 1, 0<=i<k. 模拟二进制减法,当bin[]中恰好有6个1时输出S[]中对应的元素.如此循环减法.当输出的个数等于C(k,6)时算法停止. 不过该算法的复杂度是O(2^k)… Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator