Good Indices solution codechef
Good Indices solution codechef Chef has an array AA of length NN. He calls an index ii (1≤i≤N)(1≤i≤N) good if there exists some j≠ij≠i such that Ai=AjAi=Aj. Chef can perform the following operation at most once: Choose any subsequence of the array AA and add any positive integer to all the elements of the chosen subsequence. Determine the maximum number of good indices Chef can get. Input Format The first line of input will …