Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- using ll = long long;
- void print(vector<ll> &v) {
- for (int i = 0; i < v.size(); i++) {
- cout << v[i] << ' ';
- }
- cout << endl;
- }
- int main() {
- //ll a[] = {2, 7, 11, 12, 18};
- //ll a[3][10];
- vector<ll> a;
- vector<ll> b(10);
- vector<ll> c(5);
- for (int i = 0; i < c.size(); i++) {
- c[i] = i + 1;
- }
- //print(a);
- //print(b);
- //print(c);
- c.push_back(5);
- c.erase(c.begin() + 3);
- c.insert(c.begin() + 3, 10);
- c.pop_back();
- //print(c);
- for (auto &x: c) {
- x++;
- cout << x << ' ';
- }
- cout << endl;
- for (auto x: c) {
- cout << x << ' ';
- }
- //vector<vector<ll>> b(3, vector<ll>(10));
- /*
- double d = 3.17;
- cout << d;
- */
- /*
- char c;
- c = 'D';
- //'a' -> 97, 'b' -> 98
- //'0' -> 48
- //'1' -> 49
- cout << '8' - '0';
- string s = "abcde0";
- for (int i = 0; i < s.size(); i++) {
- cout << s[i] << ' ';
- }
- char c = '3';
- cout << int(c);
- cout << char(120);
- */
- /*
- ll a = 2e9, b = 2e9;
- ll c;
- c = (ll)a + b;
- cout << a << ' ' << b << endl;
- cout << c;
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment