Files

11 lines
241 B
C++
Raw Permalink Normal View History

2025-08-30 18:35:01 +08:00
#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;
}