Task Dependency
CodeChefOpen on judge ↗
Aman wants to do specific task from the list of n tasks(t1,t2,t3.....tn).To do some task ti that depends on some other task tj, he must first do task tj before doing ti. Q queries are fired, each query consists of n tasks, a list of tasks that depends on n task, and a list of the m indices of the task he want to perform. For each query 1. Find the minimum number of tasks that must do in order to p
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