Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //#include<cstdio>
- //#include<cassert>
- //#include<iostream>
- //#include<cstring>
- //#include<algorithm>
- #include<bits/stdc++.h>
- #include<ext/pb_ds/assoc_container.hpp>
- #include<ext/pb_ds/tree_policy.hpp>
- #define MAX ((int)2e9 + 5)
- #define MAXP ((int)1e5 + 5)
- #define MAXL ((ll)1e18 + 5)
- #define MAX_X ((int)2001)
- #define MAX_Y ((int)2001)
- #define pi acos(-1)
- //#define MOD ((int)1e9 + 7)
- #define MOD ((int)998244353 + 0)
- #define BAS ((int)1e6 + 3)
- //#define BAS ((int)2e5 + 3)
- #define N ((int)2e5 + 9)
- #define eps (1e-8)
- #define fastio ios_base::sync_with_stdio(false),cin.tie(NULL)
- #define logn 17
- #define endl "\n"
- #define mpp make_pair
- #define BUCK 105
- #define LEF (idx<<1)
- #define RIG ((idx<<1)|1)
- //#define int ll
- using namespace std;
- using namespace __gnu_pbds;
- typedef long long ll;
- typedef unsigned long long ull;
- /*fast io
- ios_base::sync_with_stdio(false);
- cin.tie(NULL);
- */
- typedef tree < int, null_type, less < int >, rb_tree_tag, tree_order_statistics_node_update > o_set;
- typedef tree < pair < int, int >, null_type, less < pair < int, int > >, rb_tree_tag, tree_order_statistics_node_update > o_setp;
- /// o_set s;
- /// s.order_of_key(k) : Number of items strictly smaller than k .
- /// *(s.find_by_order(k)) : K-th element in a set (counting from zero).
- typedef long double ldd;
- mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
- int my_rand(int l, int r)
- {
- return uniform_int_distribution<int>(l,r) (rng);
- }
- /// vector
- int main()
- {
- // sort(name + 1 , name + 6);
- // sort(vec.begin() + 1 , vec.begin() + 6);
- // fastio;
- // vector < int > arr; /// vector < data type > name -> creates an array ( actually vector ) of size 0
- //
- // int n;
- // cin>>n;
- //
- // for(int i = 0 ; i<n ; i++){
- // int a;
- // cin>>a;
- // arr.push_back(a);
- // }
- //
- // for(int i = 0 ; i<n ; i++) cout<<arr[i]<<" ";
- // cout<<endl;
- // fastio;
- int n;
- cin>>n;
- vector < int > arr(n); /// vector < data type > name -> creates an array ( actually vector ) of size n
- for(int i = 0 ; i<n ; i++){
- cin>>arr[i];
- }
- // for(int i = 0 ; i<arr.size() ; i++){
- // int a = arr[i];
- // cout<<a<<" ";
- // }
- // cout<<endl;
- // for(int a:arr){
- // a++;
- // cout<<a<<" ";
- // }
- // cout<<endl;
- for(int i = 0 ; i<arr.size() ; i++){
- int a = arr[i];
- cout<<a<<" ";
- }
- cout<<endl;
- /// erase : name.erase( name.begin() + index );
- /// iterator : name.begin();
- // arr.erase(arr.begin() + 1);
- arr.erase(arr.begin() + 2 , arr.begin() + 4);
- // arr.pop_back();
- for(int a:arr) cout<<a<<" ";
- cout<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement