next_permutation
当需要对一个序列中的元素进行全排列,可以使用该函数。
bool next_permutation(BidirectionlIterator first,BidirectionalIterator last);
包含于头文件algorithm
调用该函数即next_permutation()会取得[first,last)所标示之序列的下一个排列组合,如果没有下一个排列组合,便返回false;否则返回true。
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{<