Company: e6data
Difficulty: hard
Minimum Time Steps to Execute All Pipelines Your task: find the minimum number of time steps to execute all pipelines. Problem Statement You are given: N pipelines, numbered 1 to N C available CPU cores For each pipeline i , an integer w_i - the number of CPU cores it requires D dependencies, each a pair (a, b) meaning pipeline a must complete before pipeline b can start Each pipeline runs for exactly one time step and uses exactly w_i cores for that entire step. At each time step, you may run any subset of pipelines, provided: All dependencies of each pipeline in the subset have been completed in a previous time step. The total cores used by the subset does not exceed C . Find the minimum number of time steps to complete all N pipelines. Input Format The first line contains three integers N , D , and C . N = number of pipelines ( 1 <= N <= 18 ) D = number of dependencies ( 0 <= D <= N*(N-1)/2 ) C = number of CPU cores ( 1 <= C <= 100 ) The next line contains N intege