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.

11 lines
241 B

2 years ago
#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;
}