"Let the sum of multiple numbers be as large as possible", and, "The sum of these numbers must be greater than a given value", why do these two expressions have the same meaning, and how do you understand them?
That is, this is a judgment problem. First ask if K=10000 is satisfied, 1000 is satisfied, and 100 is satisfied. It can be solved in polynomial time.