Problem 3487 · Easy

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.

Open the interactive visualisation