_no0B

Untitled

Jul 23rd, 2021
993
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //#include<cstdio>
  2. //#include<cassert>
  3. //#include<iostream>
  4. //#include<cstring>
  5. //#include<algorithm>
  6. #include<bits/stdc++.h>
  7. #include<ext/pb_ds/assoc_container.hpp>
  8. #include<ext/pb_ds/tree_policy.hpp>
  9. #define MAX ((int)2e9 + 5)
  10. #define MAXP ((int)1e5 + 5)
  11. #define MAXL ((ll)1e18 + 5)
  12. #define MAX_X ((int)2001)
  13. #define MAX_Y ((int)2001)
  14. #define pi acos(-1)
  15. //#define MOD ((int)1e9 + 7)
  16. #define MOD ((int)998244353 + 0)
  17. #define BAS ((int)1e6 + 3)
  18. //#define BAS ((int)2e5 + 3)
  19. #define N ((int)2e5 + 9)
  20. #define eps (1e-8)
  21. #define fastio ios_base::sync_with_stdio(false),cin.tie(NULL)
  22. #define logn 17
  23. #define endl "\n"
  24. #define mpp make_pair
  25. #define BUCK 105
  26. #define LEF (idx<<1)
  27. #define RIG ((idx<<1)|1)
  28. //#define int ll
  29.  
  30.  
  31. using namespace std;
  32. using namespace __gnu_pbds;
  33.  
  34. typedef long long ll;
  35. typedef unsigned long long ull;
  36.  
  37. /*fast io
  38. ios_base::sync_with_stdio(false);
  39. cin.tie(NULL);
  40. */
  41.  
  42.  
  43.  
  44.  
  45. typedef tree < int,  null_type,  less < int >,  rb_tree_tag,  tree_order_statistics_node_update > o_set;
  46. typedef tree < pair < int, int >,  null_type,  less < pair < int, int > >,  rb_tree_tag,  tree_order_statistics_node_update > o_setp;
  47. /// o_set s;
  48. /// s.order_of_key(k) : Number of items strictly smaller than k .
  49. /// *(s.find_by_order(k)) : K-th element in a set (counting from zero).
  50.  
  51. typedef long double ldd;
  52.  
  53. mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  54.  
  55. int my_rand(int l, int r)
  56. {
  57.     return uniform_int_distribution<int>(l,r) (rng);
  58. }
  59.  
  60. /// vector
  61.  
  62. int main()
  63. {
  64. //    sort(name + 1 , name + 6);
  65. //    sort(vec.begin() + 1 , vec.begin() + 6);
  66. //    fastio;
  67. //    vector < int > arr; /// vector < data type > name -> creates an array ( actually vector ) of size 0
  68. //
  69. //    int n;
  70. //    cin>>n;
  71. //
  72. //    for(int i = 0 ; i<n ; i++){
  73. //        int a;
  74. //        cin>>a;
  75. //        arr.push_back(a);
  76. //    }
  77. //
  78. //    for(int i = 0 ; i<n ; i++) cout<<arr[i]<<" ";
  79. //    cout<<endl;
  80.  
  81. //    fastio;
  82.  
  83.     int n;
  84.     cin>>n;
  85.     vector < int > arr(n); /// vector < data type > name -> creates an array ( actually vector ) of size n
  86.     for(int i = 0 ; i<n ; i++){
  87.         cin>>arr[i];
  88.     }
  89. //    for(int i = 0 ; i<arr.size() ; i++){
  90. //        int a = arr[i];
  91. //        cout<<a<<" ";
  92. //    }
  93. //    cout<<endl;
  94.  
  95. //    for(int a:arr){
  96. //        a++;
  97. //        cout<<a<<" ";
  98. //    }
  99. //    cout<<endl;
  100.     for(int i = 0 ; i<arr.size() ; i++){
  101.         int a = arr[i];
  102.         cout<<a<<" ";
  103.     }
  104.     cout<<endl;
  105.  
  106.     /// erase : name.erase( name.begin() + index );
  107.     /// iterator : name.begin();
  108. //    arr.erase(arr.begin() + 1);
  109.  
  110.     arr.erase(arr.begin() + 2 , arr.begin() + 4);
  111. //    arr.pop_back();
  112.     for(int a:arr) cout<<a<<" ";
  113.     cout<<endl;
  114. }
  115.  
RAW Paste Data