摘要: O(1)的时间,根据前一组合枚举下一组合using System;namespace ConsoleApplication2{ class Program { static void Main(string[] args) { combian(5, 3); Console.Read(); } static void combian(int n, int k) { if (!(n >= k && k > 0 && n < 30)) { return; } int ik = (1 << k) - 1; while (ik != 0) { 阅读全文
posted @ 2011-07-20 08:00 CSDN大笨狼 阅读(378) 评论(0) 推荐(0) 编辑