Problem Setters
CodeChefOpen on judge ↗
The ACM team needs to prepare $K$ problems for NPL over $N$ days. Each problem, once prepared, also has to be printed. The preparation of a problem on day $i$ (at most one per day) costs Ai rupees, and the printing of a problem on day $i$ (also at most one per day) costs Bi rupees. Of course, a problem cannot be printed before it has been prepared (but doing both on the same day is fine). What is
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start