Submit Info #64241

Problem Lang User Status Time Memory
Associative Array cpp Nachia AC 787 ms 62.50 MiB

ケース詳細
Name Status Time Memory
2_powers_00 AC 509 ms 62.50 MiB
example_00 AC 1 ms 0.45 MiB
many_0set_00 AC 688 ms 25.14 MiB
many_0set_sparse_00 AC 104 ms 2.29 MiB
max_random_00 AC 760 ms 26.80 MiB
max_random_01 AC 732 ms 29.54 MiB
max_random_02 AC 787 ms 33.08 MiB
random_00 AC 278 ms 16.80 MiB
random_01 AC 343 ms 18.68 MiB
random_02 AC 507 ms 27.77 MiB
sparse_keys_00 AC 114 ms 3.82 MiB
sparse_keys_01 AC 132 ms 4.57 MiB
unordered_map_killer_00 AC 476 ms 62.44 MiB
unordered_map_killer_01 AC 474 ms 62.42 MiB
unordered_map_killer_02 AC 475 ms 62.42 MiB

#include<bits/stdc++.h> using namespace std; using LL = long long; using ULL = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int main() { map<ULL, ULL> A; int Q; cin >> Q; while (Q--) { int c; cin >> c; if (c == 0) { ULL k, v; cin >> k >> v; A[k] = v; } if (c == 1) { ULL k; cin >> k; cout << A[k] << "\n"; } } return 0; } struct ios_do_not_sync{ ios_do_not_sync(){ ios::sync_with_stdio(false); cin.tie(nullptr); } } ios_do_not_sync_instance;