Submit Info #66184

Problem Lang User Status Time Memory
Associative Array cpp (anonymous) AC 1703 ms 62.48 MiB

ケース詳細
Name Status Time Memory
2_powers_00 AC 1311 ms 62.48 MiB
example_00 AC 1 ms 0.41 MiB
many_0set_00 AC 1535 ms 25.03 MiB
many_0set_sparse_00 AC 389 ms 2.31 MiB
max_random_00 AC 1632 ms 26.83 MiB
max_random_01 AC 1685 ms 29.45 MiB
max_random_02 AC 1703 ms 33.09 MiB
random_00 AC 634 ms 16.75 MiB
random_01 AC 746 ms 18.71 MiB
random_02 AC 939 ms 27.76 MiB
sparse_keys_00 AC 431 ms 3.88 MiB
sparse_keys_01 AC 498 ms 4.57 MiB
unordered_map_killer_00 AC 1192 ms 62.45 MiB
unordered_map_killer_01 AC 1174 ms 62.41 MiB
unordered_map_killer_02 AC 1175 ms 62.39 MiB

#include <bits/stdc++.h> using namespace std; int main() { int times; cin>>times; map<long long, long long> given; for (int i = 0; i < times; i++) { int a; cin>>a; if (a == 0) { long long b, c; cin>>b>>c; given[b] = c; } if (a == 1) { long long b; cin>>b; cout<<given[b]<<endl; } } }