Problem 2829 · Medium

Determine the Minimum Sum of a k-avoiding Array

Take the smallest positive values in order, skipping any whose partner that sums to k is already taken.

Open the interactive visualisation