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
欢迎参加IJCAI 2020麻将智能体竞赛,大奖等你拿!Welcome to IJCAI 2020 Mahjong AI competition with amazing prizes!

一个思路

Posted by seu_enic at 2009-04-02 15:08:30 on Problem 2245
开一个数组bin[k]
初始时bin[i] <- 1, 0<=i<k.
模拟二进制减法,当bin[]中恰好有6个1时输出S[]中对应的元素.如此循环减法.当输出的个数等于C(k,6)时算法停止.
不过该算法的复杂度是O(2^k)…

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