Submit Info #65919

Problem Lang User Status Time Memory
Associative Array cpp tardigrade AC 1154 ms 62.49 MiB

ケース詳細
Name Status Time Memory
2_powers_00 AC 779 ms 62.40 MiB
example_00 AC 1 ms 0.45 MiB
many_0set_00 AC 1152 ms 25.05 MiB
many_0set_sparse_00 AC 206 ms 2.36 MiB
max_random_00 AC 1041 ms 26.90 MiB
max_random_01 AC 1071 ms 29.57 MiB
max_random_02 AC 1154 ms 33.07 MiB
random_00 AC 382 ms 16.77 MiB
random_01 AC 482 ms 18.70 MiB
random_02 AC 607 ms 27.69 MiB
sparse_keys_00 AC 214 ms 3.90 MiB
sparse_keys_01 AC 254 ms 4.55 MiB
unordered_map_killer_00 AC 739 ms 62.45 MiB
unordered_map_killer_01 AC 741 ms 62.49 MiB
unordered_map_killer_02 AC 750 ms 62.40 MiB

#include <bits/stdc++.h> #define fi first #define se second #define rep(i,s,n) for (int i = (s); i < (n); ++i) #define rrep(i, n) for (int i = n - 1; i >= 0; --i) #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define len(x) (int)(x).size() #define pb push_back #define em emplace_back #define vi vector<int> #define vl vector<long long> #define vs vector<string> #define vc vector<char> #define vd vector<double> #define vb vector<bool> #define vvi vector<vector<int>> #define vvl vector<vector<long long>> #define fast \ cin.tie(0); \ ios::sync_with_stdio(false); using namespace std; using ll = long long; using ld = long double; using P = pair<int, int>; int main() { fast int q; cin >> q; map<ll,ll> m; rep(i,0,q){ int p; cin >> p; if(p == 0){ ll k,v; cin >> k >> v; m[k] = v; }else{ ll k; cin >> k; cout << m[k] << endl; } } return 0; }