Question: STOMP, The Day After Introduction Yet another two - part assignment. The first part is programming a solution to the STOMP problem, and the second

STOMP, The Day After
Introduction
Yet another two-part assignment. The first part is programming a solution to the STOMP problem, and the second component is an analysis of the complexity of the solution.
STOMP is a great opportunity to introduce LETU students to campus organizations and start plugging them into some extra-curricular activities. One of the most popular booths at STOMP is the ACM Student Chapter which was featured near the beginning of this years STOMP highlight video. www.letu.edu/opencms/opencms/highlights/STOMP.html
As students visit with ACM officers, they are encouraged to sign up for one of the many computer-related special interest groups (SIG). This year students could sign-up for anything from the Programming Team to Gamers Anonymous. In the interest of not distracting students from the main reason they are in college; they are told to sign up for only one SIG.
The day after STOMP Brett, the chapter President, takes the sign-up sheets and attempts to make lists of students for each of the SIGs. Your job is to help him count the number of students signed up for each SIG. A student can only be counted for one SIG. Any students, who have signed up for more than one SIG, should be discarded and not counted for any SIG. Some enthusiastic students may have signed-up more than once for a SIG and should only be counted once.
Inputs
The console input will consist of zero or more groups of STOMP data. Each group will end with a line that starts with the character 1, The last data set is followed by a line beginning with 0. Each group of data consists of one or more SIG lists. Each SIG list begins with a line containing the SIG name in capital letters, followed by the username or interested students, one per line.
Output
For each set of STOMP data, output a summary of each SIG group. The summary consists of a line with the SIG name followed by a space and then the number of students signed up. The SIG groups must be listed primarily in non-increasing order of the number of signups, and secondly in lexicographical order.

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 Programming Questions!