Author: | twitch.tv/jollyfuzz | Time limit: | 1 sec | |
Input file: | Standard input | Memory limit: | 256 Mb | |
Output file: | Standard output |
Kolya’s team switched to a new tool for automating continuous integration and continuous delivery processes - GitClub CI/CD.
Pipeline consists of N stages, and stages consist of Mi jobs.
All jobs in one stage are executed in parallel, and the next stage cannot begin until all jobs in the previous stage have completed.
Kolya needs to write a feature that, based on a given description of stages and durations of tasks, calculates total execution time of the pipeline.
First line contains one integer N - number of stages.
Next lines are descriptions of N stages, the description of each stage consists of three lines:
First line - string from small Latin letters and underscores Xi - name of the stage.
Second line - integer Mi - number of tasks in the stage.
Third line - integer array Ti - tasks durations in seconds.
One integer - total execution time of pipeline in seconds.
1 ≤ N ≤ 100
1 ≤ |Xi| ≤ 100
1 ≤ Mi ≤ 1000
1 ≤ Ti,j ≤ 107
No. | Standard input | Standard output |
---|---|---|
1 |
|
|