使用STL的next_permutation函数生成全排列(C++)
摘要:
文章作者:姜南(Slyar)文章来源:Slyar Home (www.slyar.com) 转载请注明,谢谢合作。下午研究了一下全排列算法,然后发现C++的STL有一个函数可以方便地生成全排列,这就是next_permutation在C++ Reference中查看了一下next_permutation的函数声明:#include <algorithm>bool next_permutation( iterator start, iterator end );Thenext_permutation() function attempts to transform the given 阅读全文
posted @ 2013-04-20 18:39 点A点C 阅读(322) 评论(0) 推荐(0) 编辑