There are a number of artists that have recorded albums with tracks. Moreover, there are a number of users subscribed to artists. Print the catalog of artists on the appropriate format, including the subscribed users of each artist.
The input starts with an integer denoting the number of artists. The next lines contain the description of each artist on the format “artist name-isGroup”, where artist name is the name of the artist and isGroup equals “Y” if the artist is a group, and “N” otherwise.
The next line contains an integer denoting the number of albums. The next lines contain the description of each album on the format “artist name-album name-isListed”, where artist name is the name of the artist recording the album, album name is the name of the album, and isListed equals “Y” if the album is listed, and “N” otherwise.
The next line contains an integer denoting the number of tracks. The next lines contain the description of each track on the format “artist name-album name-track name-master file-duration”. Here, master file is the name of the sound file containing the track, and duration is its duration in seconds.
The next line contains an integer denoting the number of users. The next lines contain the description of each user on the format “user name-user email.
The next line containt an integer denoting the number of subscriptions. The next lines contain the description of each subscription on the format “user name-artist name.
For each artist in the order they appear in the input, print its information on the format specified in the example.
Author: Anders Jonsson
Generation: 2026-01-25T15:25:40.388Z
© Jutge.org, 2006–2026.
https://jutge.org