Tap here to switch tabs
Problem
Submissions

Problem: Minimum Time to Complete All Tasks

Try to solve the Minimum Time to Complete All Tasks problem.

Statement

You are given a 22D integer array tasks, where tasks[i] = [start_i, end_i, duration_i].

Each task must be actively run for a total of duration_i integer time units within the inclusive time interval [[start_i, end_i]].

The computer can run multiple tasks simultaneously, and running several tasks during the same time unit only counts as 11 unit of active time.

Return the minimum total time units the computer must be turned on to complete all tasks.

Constraints:

  • 1≤1 \leq tasks.length ≤2000\leq 2000

  • tasks[i].length =3= 3

  • 1≤1 \leq start_i, end_i ≤2000\leq 2000

  • 1≤1 \leq duration_i ≤\leq end_i −- start_i +1+ 1

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Time to Complete All Tasks

Try to solve the Minimum Time to Complete All Tasks problem.

Statement

You are given a 22D integer array tasks, where tasks[i] = [start_i, end_i, duration_i].

Each task must be actively run for a total of duration_i integer time units within the inclusive time interval [[start_i, end_i]].

The computer can run multiple tasks simultaneously, and running several tasks during the same time unit only counts as 11 unit of active time.

Return the minimum total time units the computer must be turned on to complete all tasks.

Constraints:

  • 1≤1 \leq tasks.length ≤2000\leq 2000

  • tasks[i].length =3= 3

  • 1≤1 \leq start_i, end_i ≤2000\leq 2000

  • 1≤1 \leq duration_i ≤\leq end_i −- start_i +1+ 1