9 solutions

  • -3
    @ 2024-11-2 9:09:28
    #include<bits/stdc++.h>
    using namespace std;
    const in
    t N=25;
    for (i
    nt i=1;i<=n;i++) { cin>>a[i]; } for
    
      
    =1;i<=n;i++
    ) { for
    
    (int j=1;j+1<=n-i+1;j++) { if (a[j
    ]>a
    
    
    
    [j+1])
    for(int i=1;i<=n
    i++) cout<<a[i]<<" "; return 0; }
    

    Information

    ID
    60
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    162
    Accepted
    49
    Uploaded By