Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma GCC optimize("O3")
- #include <bits/stdc++.h>
- using namespace std;
- #define int long long
- #define double long double
- #define _FastIO ios_base::sync_with_stdio(0); cin.tie(0)
- signed main()
- {
- _FastIO;
- int n;
- cin >> n;
- // static array
- //int a[n];
- // dynamic array
- vector<int> a(n); // size = n ,
- /*for(int i = 0; i < n; i++){
- cin >> a[i];
- }*/
- a.push_back(5);
- cout << a.size() << '\n';
- for(int i = 0; i < a.size(); i++){
- cout << a[i] << " ";
- }
- cout << '\n';
- cout << a.back();
- /*
- string s;
- cin >> s; // Aa0bcBC123
- sort(s.begin() , s.end());
- cout << s; // 0123ABCabc
- */
- // 0 0 0 5
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement