There are a number of artists that have recorded albums with tracks. Print the catalog of artists on the appropriate format.
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.
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-25T14:59:10.957Z
© Jutge.org, 2006–2026.
https://jutge.org