Advertisement
LEGEND2004

map

Mar 24th, 2024
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.92 KB | None | 0 0
  1. //https://cplusplus.com/reference/map/map/?kw=map
  2. #pragma GCC optimize("O3")
  3. #include <bits/stdc++.h>
  4. using namespace std;
  5.  
  6. #define int long long
  7. #define fastio ios_base::sync_with_stdio(0); cin.tie(0)
  8.  
  9. signed main()
  10. {
  11.     fastio;
  12.  
  13.     /*map<string , string> mp;
  14.     mp["AC"] = "Accepted";
  15.     mp["WA"] = "Wrong Answer";
  16.     cout << mp["AC"] << '\n'; //
  17.     cout << mp.size() << '\n'; //
  18.     cout << mp["TLE"] << '\n';
  19.     cout << mp.size() << '\n';
  20.     mp["AA"] = "BB";
  21.     for(auto i : mp){
  22.         cout << i.first << " " << i.second << '\n';
  23.     }*/
  24.     map<string , vector<string> > v;
  25.     v["AC"].push_back("Accepted");
  26.     v["AC"].push_back("100%");
  27.     for(auto i : v["AC"]){
  28.         cout << i << " ";
  29.     }
  30.     /*
  31.  
  32.     {"AC" , "Accepted"}
  33.     {"TLE" , ""}
  34.     {"WA" , "Wrong Answer"}
  35.  
  36.     8
  37.     1 2 2 3 4 4 3 3 105
  38.  
  39.     {1 , 1}
  40.     {2 , 2}
  41.     {3 , 3}
  42.     {4 , 2}
  43.     {105 , 1}
  44.  
  45.     */
  46. }
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement