fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. void bubble(vector<int>v){
  4. vector<int>ans;
  5. copy(v.begin(), v.end(), back_inserter(ans));
  6. /* for(int i=0;i<v.size();i++){
  7. for(int j=0;j<v.size();j++){
  8. if(v[j]<=v[i])
  9. swap(v[i],v[j]);
  10. }
  11. }*/
  12. for(int i=0;i<ans.size();i++)
  13. cout<<ans[i]<<" ";
  14. //return v;
  15. }
  16. int main() {int n;cin>>n;
  17. vector<int>v(n);vector<int>ans;
  18. for(int i=0;i<v.size();i++)cin>>v[i];
  19. /*vector<int>w=bubble(v);
  20. for(int i=0;i<w.size();i++)
  21. cout<<w[i]<<" ";*/
  22. // your code goes here
  23. return 0;
  24. }
Success #stdin #stdout 0.01s 5348KB
stdin
6
2 4 5 6 1 2
stdout
Standard output is empty