Problem 2915 · Medium

Length of the Longest Subsequence That Sums to Target

Track the longest count that reaches each sum, using each number at most once by scanning sums downward.

Open the interactive visualisation