• + 1 comment

    For Sample Input 0

    6 4 6 5 3 3 1

    {4,3,3} is NOT a subarray of the input array. Subarrays are contiguous. Does anyone proofread these before they are posted?

    I'd vent more but this page appears to not have been tested on Safari. FFS. Ignore all text bdlow this that I can't access when editing.

    3 Explanation 0 We choose the following multiset of integers from the array: . Each pair in the multiset has an absolute difference (i.e., and ), so we print the number of chosen integers, , as our answer.