Find the maximum number of towers that will receive the signal.
The first line contains two integers, N, denoting the number of towers, and K, denoting the maximum number of changes. The second line contains N space-separated integers, denoting the frequency of the receiver of each tower.
The maximum number of towers that will receive the signal.
N = 5 K = 2 frequencies = [10, 10, 30, 40, 30]
Initially, Alex can choose any signal frequency and transmit it.