🎁 Exclusive Offer! Join our
Telegram Channel
to get **special discounts** and updates! 🚀
Question 53 - 100% Working Solution | Buy Now
Description
2 Live
Network Park - Maximum Noiseless Networks
A network company wants to establish a network park to reduce the noise of different network operators. In network park, different operators will setup up their sender antenna, or receiver antenna, or both. The sender antenna and receiver antenna are represented by two list of size N and M respectively. These antennas will only receive/send to their respective sender/receiver antenna, but doing this process will retain some noise. Noise is a result of a crossed signal i.e., a signal in which the signal of one network operator is overlapped by the signal of the other network operator. Now network company wants to know the maximum numbers of network that will be noiseless.
Write an algorithm to find the maximum numbers of network that will be noiseless.
Input
The first line of the input consists of an integer - sender_size, representing the total number of sender antennas.
The next line consists of N space-separated integers, representing sender antennas(N).
The next line consists of an integer - receiver_size, representing the total number of receiver antennas(M).
The next line consists of M space-separated integers, representing receiver antennas.
Output
Print an integer representing the maximum number of networks that will be noiseless.
Example
Input:
3
785
3
758
Output:
2