Advertisement
LEGEND2004

string, vector

Apr 6th, 2024
664
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.08 KB | None | 0 0
  1. #pragma GCC optimize("O3")
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4.  
  5. #define int long long
  6. #define double long double
  7. #define pb push_back
  8. #define endl '\n'
  9. #define fastio ios_base::sync_with_stdio(0); cin.tie(0)
  10.  
  11.  
  12. signed main()
  13. {
  14.     fastio;/*
  15.     string s;
  16.     cin >> s;
  17.     int n = 0;
  18.     for(auto i : s){
  19.         n = n * 10 + i - '0';
  20.     }
  21.     cout << n;*/
  22.  
  23.     /*
  24.     int n;
  25.     cin >> n;
  26.     string s = "";
  27.     while(n){
  28.         s += n % 10 + '0';
  29.         n /= 10;
  30.     }
  31.     reverse(s.begin() , s.end());
  32.     cout << s;*/
  33. /*
  34.     string s;
  35.     cin >> s;
  36.     for(char& i : s)
  37.         i = toupper(i);
  38.  
  39.     cout << s;*/
  40.  
  41.     // abcDEF
  42.     // ABCDEF
  43.     /*
  44.     char c;
  45.     cin >> c; // a
  46.     cout << (++c); // b
  47.     */
  48.  
  49.     vector<array<int , 3> > v;
  50.     v.pb({1 , 2 , 3});
  51.     v.pb({3 , 5 , 7});/*
  52.     for(int i = 0; i < v.size(); i++){
  53.         cout << v[i][0] << " " << v[i][1];
  54.         cout << " " << v[i][2] << '\n';
  55.     }*/
  56.  
  57.     for(auto i : v){
  58.         cout << i[0] << " " << i[1];
  59.         cout << " " << i[2] << "\n";
  60.     }
  61.  
  62.  
  63.  
  64.  
  65. }
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement