提交时间:2024-03-09 09:26:38
运行 ID: 136432
#include <iostream> #include <algorithm> #include <string.h> using namespace std; bool cmp(int a, int b) { return a > b; } int s1[10000]; int main() { cin >> s1; sort(s1.begin(), s1.end(), cmp); do { cout << s1 << " "; } while (next_permutation(s1.begin(), s1.end(),cmp)); }