Problem 3509 · Hard

Maximum Product of Subsequences With an Alternating Sum Equal to K

Track, for each parity and alternating sum, the set of products still under the limit, and read off the largest product whose alternating sum equals k.

Open the interactive visualisation