fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. vector<int> v{1,2,3,4,5};
  7. vector<int> v1{4,2,1};
  8. v1 = v;
  9. for(int i=0;i<v1.size();i++)
  10. cout<<v1[i]<<" ";
  11. return 0;
  12. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
1 2 3 4 5