Company: opentext_13oct
Difficulty: medium
Perfect Dancers Problem Description A dance academy runs both a morning batch and an evening batch. Every enrolled student receives a unique ID, and students may sign up for any number of dance styles. Students who haven't yet mastered a single style attend both batches. The instructor keeps a separate attendance list for the morning and evening batches, and a student's ID appears on a list once for every dance style they have registered for. Ahead of the annual showcase, the academy plans to spotlight several dance styles and wants to pick leaders to headline the event. The instructor is on the lookout for dancers who have truly mastered particular styles. By the instructor's rule, a mastered dancer is someone who shows up in only one of the two batches - morning or evening, not both. Design an algorithm to count how many mastered dancers the instructor can select to lead the event. A dancer who has mastered more than one style should be counted once for each such style. Input The fir