#include<iostream> using namespace std; const int MAXN=11; int main() { int n; int a[MAXN]; bool ok; n=10; for(int i=0;i<n;i++) cin>>a[i]; for(int i=n-1;i>=1;i--){ ok=true; for(int j=0;j<i;j++){ if(a[j]<a[j+1]){ swap(a[j],a[j+1]); ok=false; } } if(ok==true) break; } for(int i=0;i<n;i++) cout<<a[i]<<" "; } /************************************************************** Problem: 1169 User: admin Language: C++ Result: Accepted Time:9 ms Memory:2072 kb ****************************************************************/