Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <iomanip>
  4. #include <vector>
  5. #include <algorithm>
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.     int64_t n;
  11.     cin >> n;
  12.  
  13.     vector<int64_t> v(n * n);
  14.  
  15.     for (int64_t i = 0; i < (n * n); i++)
  16.     {
  17.         cin >> v[i];
  18.     }
  19.  
  20.     sort(v.begin(), v.end());
  21.  
  22.     for (int i = 0; i < v.size(); i++)
  23.     {
  24.         cout << v[i] << " ";
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement