Chef and Task Management
CodeChefOpen on judge ↗
Chef has a lot of pending tasks and needs your help to complete them. There are N tasks to be completed. All the tasks have a unique number assigned to them from 1 to N. Chef knows two things: - The given order in which all the tasks are listed - The ideal order in which all the tasks must be completed Now, let us demonstrate this by an example. Let's say that there are 3 tasks, the given ord
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