Company: phonepe_30july
Difficulty: medium
Maximize Exercises in Workshops Problem Description A teacher is organising a series of coding workshops using a collection of student-created exercises. She has prepared k exercises, where each exercise belongs to a particular category (represented by an integer). Some exercises may share the same category. The teacher wants to organise multiple workshops, each conducted on a separate day. For each workshop: All exercises used on a given day must belong to the same category . Each workshop must focus on a unique category (i.e., no two workshops can use the same category). The number of exercises used each day must be exactly double the number used on the previous day. The first day's workshop can have any positive number of exercises. She can choose not to use all the exercises . Some may remain unused if they don't fit the pattern. The teacher wants to plan the workshops in a way that maximizes the total number of exercises used over all days. Input Format The first line provides an