Found this HackerRank problem recently, very similar to the Div2 A problem in Educational Round 89 but a more general form.
It seems that these kinds of problems can be solved with something similar linear programming? at least for the Div2 A problem all we had to do was identify the constraints and output the minimum of them. Does anyone know exactly what topic these problems come under and how to find more like them?
Here's the statement for those who don't want to click the link:
HackerRank Problem Statement
Would appreciate if anyone can give ideas on how to solve specifically this problem and problems similar to it.