1 solutions

  • 0
    @ 2024-4-13 13:32:27

    #include<bits/stdc++.h> using namespace std; int n,a[10000]; int main() { cin>>n; for(int i=0;i<n;i++) cin>>a[i]; if(prev_permutation(a,a+n)) for(int i=0;i<n;i++) cout<<a[i]<<" "; cout<<endl; return 0; }

    • 1

    Information

    ID
    1523
    Time
    1000ms
    Memory
    125MiB
    Difficulty
    1
    Tags
    # Submissions
    1
    Accepted
    1
    Uploaded By