Vamsi the MasterMind
CodeChefOpen on judge ↗
Vamsi has a todo list of n works. Each work can be subdivided into several ordered subtasks. At a time, Vamsi can complete single subtask, but only first or last out of the remaining list of subtask of a work. Each subtask consumes some time(in minutes), which is given. Today, Vamsi decided to complete k subtasks(not need to be of same work) but must follow above condition i.e. first or last subta
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