Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

More Books

Students also viewed these Databases questions