Submit Info #67621

Problem Lang User Status Time Memory
Associative Array cpp oo9 AC 711 ms 62.47 MiB

ケース詳細
Name Status Time Memory
2_powers_00 AC 521 ms 62.45 MiB
example_00 AC 1 ms 0.42 MiB
many_0set_00 AC 636 ms 25.12 MiB
many_0set_sparse_00 AC 111 ms 2.34 MiB
max_random_00 AC 711 ms 26.83 MiB
max_random_01 AC 673 ms 29.45 MiB
max_random_02 AC 703 ms 33.03 MiB
random_00 AC 244 ms 16.78 MiB
random_01 AC 290 ms 18.69 MiB
random_02 AC 414 ms 27.66 MiB
sparse_keys_00 AC 118 ms 3.84 MiB
sparse_keys_01 AC 137 ms 4.55 MiB
unordered_map_killer_00 AC 493 ms 62.47 MiB
unordered_map_killer_01 AC 493 ms 62.38 MiB
unordered_map_killer_02 AC 492 ms 62.44 MiB

#include <bits/stdc++.h> using namespace std; int main() { int Q; cin >> Q; map<long, long> T; long long zero = 0; for (int i = 0; i < Q; i++) { long long n, k, v; scanf("%lld", &n); if (n == zero) { scanf("%lld", &k); scanf("%lld", &v); T[k] = v; } else { scanf("%lld", &k); printf("%lld\n", T[k]); } } }