Question: Please answer , it's urgent Chef has just started watching Game of Thrones, and he wants to first calculate the exact time (in minutes) that

 Please answer , it's urgent Chef has just started watching Game

of Thrones, and he wants to first calculate the exact time (in

minutes) that it'll take him to complete the series The series has

Please answer , it's urgent

Chef has just started watching Game of Thrones, and he wants to first calculate the exact time (in minutes) that it'll take him to complete the series The series has S seasons, and the ith season has E, episodes, each of which are Li 1, L1,2,..., Li,e, minutes long. Note that these Lis include the duration of the beginning intro song in each episode. The streaming service that he uses, allows Chef to skip the intro song. The intro song changes slightly each season. and so he wants to watch the intro song in the first episode of each season, but he'll skip it in all other episodes of that season (yes, we know, a sacrilege!). You know that the intro song lasts for Q2 minutes in the ith season Find the total time in minutes, that he has to watch Input: First line will contain a single integer, T, denoting the number of testcases. Then the testcases follow. The first line of each testcase will contain a single integer S, denoting the total number of seasons. The second line contains S space separated integers, Q1, Q2, ...,Qs. where Q, denotes the duration of the intro song in the ith season. The ith of the next S lines contains E; + 1 space separated integers, where the first integer is Ej, denoting the number of episodes in the ith season. That is followed by the duration of each of the E, episodes, L1,L1,2,..., LE Output: For each testcase, output the answer in a single line. Constraints 1ST

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!