Codeforces 1312B. Bogosort Solution
Solution in c++:
- ///**********ALLAH IS ALMIGHTY************///
- ///AH Tonmoy
- ///Department of CSE,23rd batch
- ///Islamic University,Bangladesh
- #include<iostream>
- #include<algorithm>
- using namespace std;
- int main()
- {
- int n,i,a[500],t;
- cin>>t;
- while(t--)
- {
- cin>>n;
- for(i=0; i<n; i++)
- cin>>a[i];
- sort(a,a+n);
- for(i=n-1; i>=0; i--)
- cout<<a[i]<<" ";
- cout<<endl;
- }
- }
People write in english language
ReplyDelete