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 |
你的算法不能产生字典序组合,改进一下!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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator