wu

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2010年12月7日

摘要: MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0第一种方法,比较简单,借助于STL库中的next_permutation函数。next_permutation的作用就是计算全排列。示例:输出整数数组array的全排列#include <iostream>#include <algorithm>using namespace std;int array[] = {1, 2, 3, 4};const int iArraySize = sizeof(array)/sizeof(int);int main(){ 阅读全文
posted @ 2010-12-07 20:25 butterflydog 阅读(756) 评论(0) 推荐(0) 编辑