You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#include<bits/stdc++.h>
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
//C++STL<54><4C>ȫ<EFBFBD><C8AB><EFBFBD>к<EFBFBD><D0BA><EFBFBD>next_permutation<6F><6E>ʹ<EFBFBD><CAB9>
|
|
|
|
|
// https://blog.csdn.net/ac_gibson/article/details/45308645
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
int a[3] = { 3,1,2 };
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
sort(a, a + 3);
|
|
|
|
|
|
|
|
|
|
//ȫ<><C8AB><EFBFBD><EFBFBD>
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
cout << a[0] << a[1] << a[2] << endl;
|
|
|
|
|
} while (next_permutation(a, a + 3));
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|