Submit Info #67762

Problem Lang User Status Time Memory
Associative Array cpp14 SamGeisler AC 1567 ms 62.46 MiB

ケース詳細
Name Status Time Memory
2_powers_00 AC 1308 ms 62.46 MiB
example_00 AC 1 ms 0.41 MiB
many_0set_00 AC 1413 ms 25.04 MiB
many_0set_sparse_00 AC 389 ms 2.30 MiB
max_random_00 AC 1567 ms 26.82 MiB
max_random_01 AC 1523 ms 29.43 MiB
max_random_02 AC 1547 ms 33.05 MiB
random_00 AC 558 ms 16.69 MiB
random_01 AC 672 ms 18.70 MiB
random_02 AC 892 ms 27.73 MiB
sparse_keys_00 AC 423 ms 3.88 MiB
sparse_keys_01 AC 496 ms 4.53 MiB
unordered_map_killer_00 AC 1179 ms 62.41 MiB
unordered_map_killer_01 AC 1176 ms 62.41 MiB
unordered_map_killer_02 AC 1175 ms 62.42 MiB

#include<iostream> #include<map> using namespace std; int main(){ int n; cin >> n; long long t,k,v; map<long long,long long> m; for(int i = 0; i<n; i++){ cin >> t; if(t){ cin >> k; cout << m[k] << endl; } else { cin >> k >> v; m[k] = v; } } return 0; }