Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main(){
- int n;
- while( cin >> n && n ){
- vector<int> p;
- int tmp;
- for( int i = 0 ; i < n ; i++ ) {
- cin >> tmp;
- p.push_back( tmp );
- }
- sort( p.begin() , p.end() );
- for( int i = 0 ; i < n - 1 ; i++ ) cout << p[i] << ' ';
- cout << p[n - 1];
- puts("");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement