Company: Cred_4nov
Difficulty: medium
Task Scheduling Validation Problem Description A project manager at a software company is planning the execution of a critical product launch involving multiple interdependent tasks. Some tasks have strict timing dependencies - for example, code testing must start exactly 2 days after development begins, and deployment preparation must start 1 day after testing starts. The organization needs to validate if a proposed task schedule is feasible. The schedule consists of N tasks that need to be assigned start times on a timeline. You're given M timing constraints specifying that task B must start exactly D time units after task A begins. Determine if it's possible to assign start times to all tasks such that all timing constraints are satisfied. Input Format: First line: N M (number of tasks, number of constraints) Next M lines: A B D (task A, task B, timing constraint meaning start_time of B should be exactly D duration after the start time of A) Output Format: "Yes" if a valid schedule