Submit Info #66780

Problem Lang User Status Time Memory
Associative Array cpp rustiebeats AC 953 ms 62.52 MiB

ケース詳細
Name Status Time Memory
2_powers_00 AC 515 ms 62.45 MiB
example_00 AC 1 ms 0.45 MiB
many_0set_00 AC 851 ms 25.13 MiB
many_0set_sparse_00 AC 105 ms 2.32 MiB
max_random_00 AC 894 ms 26.82 MiB
max_random_01 AC 926 ms 29.55 MiB
max_random_02 AC 953 ms 33.07 MiB
random_00 AC 336 ms 16.81 MiB
random_01 AC 417 ms 18.70 MiB
random_02 AC 536 ms 27.67 MiB
sparse_keys_00 AC 114 ms 3.93 MiB
sparse_keys_01 AC 133 ms 4.54 MiB
unordered_map_killer_00 AC 478 ms 62.52 MiB
unordered_map_killer_01 AC 479 ms 62.43 MiB
unordered_map_killer_02 AC 480 ms 62.52 MiB

#define _DE231123BUG #include <bits/stdc++.h> using namespace std; #define endl "\n" #define all(x) (x).begin(), (x).end() typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const double pi = acos(-1.0); const int INF = 987654321; //// int main(){ #ifdef _DEBUG freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ios::sync_with_stdio(false); cin.tie(NULL); int Q; cin >> Q; map<ll, ll> mp; while(Q--){ int q; cin >> q; if(q == 0){ ll a, b; cin >> a >> b; mp[a] = b; } else{ ll a; cin >> a; cout << mp[a] << endl; } } return 0; }