fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5.  
  6. // #ifndef ONLINE_JUDGE
  7. // freopen("input.txt","r",stdin);
  8. // freopen("output.txt", "w", stdout);
  9. // #endif
  10.  
  11. vector<pair<int,int>>v;
  12.  
  13. int n; cin>>n;
  14. int a,b;
  15. // cout<<n<<endl;
  16. for(int i=0;i<n;i++){
  17. cin>>a;
  18. cin>>b;
  19. v.push_back( make_pair(a,b) );
  20. // v[i].first=a;
  21. // v[i].second=b;
  22. // v[i]={a,b};
  23. }
  24. for(int i=0;i<n;i++){
  25. cout<<v[i].first<<" ";
  26. cout<<v[i].second<<" ";
  27. }
  28.  
  29.  
  30.  
  31.  
  32.  
  33. return 0;
  34. }
Success #stdin #stdout 0.01s 5352KB
stdin
2
2 3 4 5
stdout
2 3 4 5