Maximum Unique Subarray Sum After Deletion
Delete any elements, then take a subarray with distinct values; the best total keeps each positive value once, or the largest value when none is positive.
Delete any elements, then take a subarray with distinct values; the best total keeps each positive value once, or the largest value when none is positive.