You are given an array A of size N.
You must partition the array into one or more contiguous subarrays, with the following rules:
Every element of A must belong to exactly one subarray.
Each subarray must have length at least K.
The beauty of a subarray is defined as the maximum XOR value obtainable from any subset of the elements in that
subarray.
The amazingness of a partition is the sum of the beauties of all subarrays in the partition.
Your task is to determine the maximum possible amazingness of array A over all valid partitions.
Constraints : 1 <= N <= 100,000 , 1 <= K <= N , 1 <= $$$A_i$$$ <= 100,000
Any idea about how to solve this problem.








