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;
|
|
|
|
|
int a[] = {1, 4, 6, 5, 3, 2, 1};
|
|
|
|
|
int main() {
|
|
|
|
|
next_permutation(a, a + 7);
|
|
|
|
|
for (int i = 0; i < 7; i++)
|
|
|
|
|
cout << a[i] << " ";
|
|
|
|
|
// 答案:1 5 1 2 3 4 6
|
|
|
|
|
return 0;
|
|
|
|
|
}
|