#K47967. Minimal Total Delivery Time
Minimal Total Delivery Time
Minimal Total Delivery Time
You are given a set of checkpoints and a number of delivery personnel. Each personnel has a start time, an end time, and a sequence of checkpoints they need to visit in order. The minimal total delivery time is defined as the total number of checkpoints that all personnel must visit.
Your task is to compute this minimal total delivery time by simply summing up the number of checkpoints assigned to each delivery personnel.
Note: Even though start and end times are provided, they do not affect the computation in this simplified version of the problem.
inputFormat
The input is read from standard input (stdin) and has the following format:
n m s₁ e₁ k₁ checkpoint₁ checkpoint₂ ... checkpointₖ₁ s₂ e₂ k₂ checkpoint₁ checkpoint₂ ... checkpointₖ₂ ... sₘ eₘ kₘ checkpoint₁ checkpoint₂ ... checkpointₖₘ
Here, the first line contains two integers n and m, where n is the number of checkpoints and m is the number of delivery personnel. Each of the following m lines describes one delivery personnel with their start time sᵢ, end time eᵢ, and an integer kᵢ representing the number of checkpoints to visit, followed by the list of kᵢ checkpoint numbers.
outputFormat
Output a single integer to standard output (stdout) representing the minimal total delivery time (i.e., the sum of all kᵢ for each delivery personnel).
## sample5 2
0 10 3 1 3 5
5 15 4 2 1 4 5
7
</p>