Maximize the value of expression [i.j - K.(Ai | Aj)] over all pairs (i, j) in given Array
Given an array A[] of length N and an integer K, the task is to maximize the value of expression [i.j - K.(Ai | Aj)] over all pairs (i, j) in given Array, where (1 ⤠i < j ⤠N) and | denotes Bitwise OR operator. Examples: Input: A[] = {5, 20, 1, 0, 8, 11}, K = 10Output: 2Explanation: The maximum