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! | 北京大学《ACM/ICPC大学生程序设计竞赛训练》暑期课面向全球招生!

你的算法不能产生字典序组合,改进一下!

Posted by 19910517 at 2009-08-18 08:38:00 on Problem 2245
In Reply To:Re:只是一个生成组合的算法 Posted by:tangr206 at 2009-07-24 19:23:21
(1)开始flag[n]前m置值为1;
(2)从右往左遇到有“1、0”组合,停止置为“0、1”
若此组合的右边:凡1皆在最右边,则将最右边的1全都移到此组合的右边临近处。
(3)重复(2)直到找不到这样的组合。

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