一组数的全排列和组合程序实现 - Zero Lee
Zero Lee
·
2012-06-17
·
via 博客园 - Zero Lee
显示一组数的全排列和组合程序: 1 void print(const std::vector<int>& s) 2 { 3 static int n = 1; 4 printf("%d:", n++); 5 printf("["); 6 for (int i = 0; i < s.size(); i++) 7 printf(" %d ", s[i]); 8 printf("]\n"); 9 }10 11 void permutation(std::vector<int>&
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。