Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve with unique solution The Plavlist Input Output Example Input Output winterwubwubland monkeyflowers greatestsonginworld sweatchildrenofmind dundundun wintertimejoy isntshewubly sewitki markersong Mobius loves his new Gnic

image text in transcribed

image text in transcribed

Solve with unique solution

The Plavlist Input Output Example Input Output winterwubwubland monkeyflowers greatestsonginworld sweatchildrenofmind dundundun wintertimejoy isntshewubly sewitki markersong Mobius loves his new Gnic Media Computer (GMC). Mobius has his GMC communicates with his home library so that all his favorite songs can play. The order in which the GMC plays the songs is a bit random. 200 100 sweatchildrenofmind 180 100 monkeyflowers .Mobius's devices stores a list of unplayed songs. . When a song is rcs the GMC is put in the unplayed list. 10 greatestsonginworld 448 180 sewitkindofshady 300 100 dundundun 140 10 wintertimejoy 35 45 winterwubwubland 218 88 isntshewubly 480 64 markerson .Once a song ends a new one immediately begins, if an unplayed song exists The song that plays will always be the unplayed one that Mobius likes the most. . .If a song arrives as song begins to play, the new arival will not play. . When g aves and no song is playing the newly aved song begins playing immediately . No two songs wil e t the same time Last decade the order in which the songs played was amazing, but Mobius does not remember the exact order Mobius does have access to the times in which certain songs reached his GMC. He also knows the preferential order of all his songs. itlikesme niceforwho weareamerica 1996 248 yankeedandee 2500 237 whywhywhy 2200 180 nostars 1555 120 weareamerica 2802 155 alloutoftears 1348 300 niceforwho 1005 335 itlikesme and the length of each song yankeedandee nostars alloutoftears whywhywhy Please help recover Mobius's playlist by printing the amazing song order. Input Specificatiorn The first line of imput will be a single positive integer, .1,000,000) representing the number of songs streamed to Mobius's device Each of the followinglines will begin with 2 positive integers, aand , representing the arrival time in seconds from midnight and the length of the song in seconds. Following the time information will be a single string of no more than 24 lower cases Latin letters (i.e. a. 'b.c. . 'z'). Explanatioin The order in which the songs are inserted into the list is The songs are given in the order in which Mobius likes them. The finst songis Mobius's favorite song and the last song is his least faorite song. Output Specification Output the naes of the songs in the order in which they occur. 2. monkeyflowers 3 wintertimejoy 4. 8. sewitkindofshady winterwubwubland is added and played frst at time 35. The song ends at time 80 At the end (time 80)no other songs have been add to the playlist. We wait until minkevflowers is added and played at tine = 100. It will last until tine-200 By then both wintertimejoy and greatestsongiworld is added. Even though sweatchildrenotmind is added at 200 it won't be played, because a new song starts. greatestsonginworld will play (at time = 200). It ends at 210. After winterteoysweatchildrenotmind is played isatshewubly gets added smultaneously. The song lasts until time 310 By 310 dundundun is added The possible songs are swintertimejoy, isntshewubly, dundundun. The highest ranked of theseis dundundun Which lasts unil 410. No song is added by then At 410 wintertimejoy plays and will end at 420 and isntshewubly plays until 500. Both sewitkindofshady and markersong are added, and they play in the order of sewitkindofshady and markersong Case 2: 1996 240 YANKEEDANDEE 2500 237WHYWHYWHY 2200 180 NOSTARS 1555 120 WEAREAMERICA 2002 155 ALLOUTOFTEARS 1340 300 NICEFORWHO 1005 335 ITLIKESME The songs are added in the order 1. itlikesme @ 1005 options 2. niceforwho 1340 options 3. weareamerica @ 1555 4. yankeedandee@ 1996 5. alloutoftears 2002 plays itlikeme until 1340 plays niceforwho until 1640 plays weareamerica until 1760 plays yankeedandee until 2236 6. nostars 2200 plays nostars until 2416 plays alloutoftears until 2571 7. whywhywhy @ 2500 hywhy until 2808 The Plavlist Input Output Example Input Output winterwubwubland monkeyflowers greatestsonginworld sweatchildrenofmind dundundun wintertimejoy isntshewubly sewitki markersong Mobius loves his new Gnic Media Computer (GMC). Mobius has his GMC communicates with his home library so that all his favorite songs can play. The order in which the GMC plays the songs is a bit random. 200 100 sweatchildrenofmind 180 100 monkeyflowers .Mobius's devices stores a list of unplayed songs. . When a song is rcs the GMC is put in the unplayed list. 10 greatestsonginworld 448 180 sewitkindofshady 300 100 dundundun 140 10 wintertimejoy 35 45 winterwubwubland 218 88 isntshewubly 480 64 markerson .Once a song ends a new one immediately begins, if an unplayed song exists The song that plays will always be the unplayed one that Mobius likes the most. . .If a song arrives as song begins to play, the new arival will not play. . When g aves and no song is playing the newly aved song begins playing immediately . No two songs wil e t the same time Last decade the order in which the songs played was amazing, but Mobius does not remember the exact order Mobius does have access to the times in which certain songs reached his GMC. He also knows the preferential order of all his songs. itlikesme niceforwho weareamerica 1996 248 yankeedandee 2500 237 whywhywhy 2200 180 nostars 1555 120 weareamerica 2802 155 alloutoftears 1348 300 niceforwho 1005 335 itlikesme and the length of each song yankeedandee nostars alloutoftears whywhywhy Please help recover Mobius's playlist by printing the amazing song order. Input Specificatiorn The first line of imput will be a single positive integer, .1,000,000) representing the number of songs streamed to Mobius's device Each of the followinglines will begin with 2 positive integers, aand , representing the arrival time in seconds from midnight and the length of the song in seconds. Following the time information will be a single string of no more than 24 lower cases Latin letters (i.e. a. 'b.c. . 'z'). Explanatioin The order in which the songs are inserted into the list is The songs are given in the order in which Mobius likes them. The finst songis Mobius's favorite song and the last song is his least faorite song. Output Specification Output the naes of the songs in the order in which they occur. 2. monkeyflowers 3 wintertimejoy 4. 8. sewitkindofshady winterwubwubland is added and played frst at time 35. The song ends at time 80 At the end (time 80)no other songs have been add to the playlist. We wait until minkevflowers is added and played at tine = 100. It will last until tine-200 By then both wintertimejoy and greatestsongiworld is added. Even though sweatchildrenotmind is added at 200 it won't be played, because a new song starts. greatestsonginworld will play (at time = 200). It ends at 210. After winterteoysweatchildrenotmind is played isatshewubly gets added smultaneously. The song lasts until time 310 By 310 dundundun is added The possible songs are swintertimejoy, isntshewubly, dundundun. The highest ranked of theseis dundundun Which lasts unil 410. No song is added by then At 410 wintertimejoy plays and will end at 420 and isntshewubly plays until 500. Both sewitkindofshady and markersong are added, and they play in the order of sewitkindofshady and markersong Case 2: 1996 240 YANKEEDANDEE 2500 237WHYWHYWHY 2200 180 NOSTARS 1555 120 WEAREAMERICA 2002 155 ALLOUTOFTEARS 1340 300 NICEFORWHO 1005 335 ITLIKESME The songs are added in the order 1. itlikesme @ 1005 options 2. niceforwho 1340 options 3. weareamerica @ 1555 4. yankeedandee@ 1996 5. alloutoftears 2002 plays itlikeme until 1340 plays niceforwho until 1640 plays weareamerica until 1760 plays yankeedandee until 2236 6. nostars 2200 plays nostars until 2416 plays alloutoftears until 2571 7. whywhywhy @ 2500 hywhy until 2808

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions