Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <unordered_map>
- #include "optimization.h"
- std::unordered_map <int, int> mapa;
- int main() {
- std::ios_base::sync_with_stdio(false);
- std::cin.tie(0);
- std::cout.tie(0);
- int input;
- int value;
- int amount;
- std::cin >> amount;
- for(int i = 0; i < amount; i++) {
- std::cin >> input;
- if (!mapa.count(input)) {
- mapa[input] = 1;
- }
- }
- int kek = 0;
- std::cin >> amount;
- for(int i = 0; i < amount; i++){
- std::cin >> input;
- if(mapa.count(input))
- kek++;
- }
- std::cout << kek;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement