Submit Info #67333

Problem Lang User Status Time Memory
Associative Array cpp (anonymous) AC 737 ms 62.52 MiB

ケース詳細
Name Status Time Memory
2_powers_00 AC 509 ms 62.41 MiB
example_00 AC 1 ms 0.45 MiB
many_0set_00 AC 650 ms 25.12 MiB
many_0set_sparse_00 AC 104 ms 2.34 MiB
max_random_00 AC 644 ms 26.89 MiB
max_random_01 AC 732 ms 29.57 MiB
max_random_02 AC 737 ms 33.06 MiB
random_00 AC 228 ms 16.84 MiB
random_01 AC 366 ms 18.64 MiB
random_02 AC 443 ms 27.70 MiB
sparse_keys_00 AC 113 ms 3.83 MiB
sparse_keys_01 AC 132 ms 4.59 MiB
unordered_map_killer_00 AC 476 ms 62.52 MiB
unordered_map_killer_01 AC 479 ms 62.48 MiB
unordered_map_killer_02 AC 477 ms 62.43 MiB

#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define nope cin.tie(0), cout.tie(0)->sync_with_stdio(0) #define file_read freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); typedef long long ll; typedef vector<ll> vi; typedef vector<bool> vb; typedef pair<ll, ll> pi; typedef vector<vi> vvi; typedef vector<pi> vpi; #define ff first #define ss second #define pb push_back #define mp make_pair int main(void) { nope; // file_read; map<ll, ll> m; int Q; cin >> Q; for (int i = 0; i < Q; i++) { int a; cin >> a; if (a == 0) { ll k, v; cin >> k >> v; m[k] = v; } else { ll k; cin >> k; cout << m[k] << "\n"; } } return 0; }