Problem 42996. what can you get for exactly amount of money
Please add more than one test case. Otherwise, the problem can be obviated by simply hard-coding solutions. You mention that with some data sets there could be more than one solution. Well, please put in the time and effort to develop a suitable test suite with such test cases included. Three or four test cases should be a minimum.
A good problem, but it desperately needs more test cases. Sadly, intlinprog is not an acceptable solution method.
This is a nice problem, I encourage you to extend it with additional test cases. Also it is unclear what format you would expect the output to be when there are multiple solutions: multiple outputs? a cell array?
Out of curiosity, why was this solution marked as "potential spam"? (I hope that someone'll take a look and see that it's nothing of that sort!)
The solution has been marked as not-spam now.
But we do not know what exactly is the reason it was marked as such (I do not know the specifics of the spam filter or its algorithm), my best guess is probably the use of nouns (it is weird, I know).
Problem Recent Solvers85
Return elements unique to either input
Arrange vector in ascending order
Given a window, how many subsets of a vector sum positive
More from this Author12
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!