Parts Management with Hyundai Mobis
Time limit1sMemory limit1024 MB
Split N parts into the fewest groups whose total size stays within A and total weight within B, then print a fixed message for each run.
- Level
Easy3 of 10
- Topics
- Implementation, Greedy
- Solved
- No attempts yet
Problem

Hyundai Mobis is a global top-7 auto parts maker with annual revenue above 36 trillion won.
Founded in 1977, Hyundai Mobis focuses its capabilities on future mobility fields such as autonomous driving, connectivity, and electrification, under the vision 'Innovation for Humanity, Mobility for Tomorrow'.
Hyundai Mobis leads development of core automotive parts such as electrification, braking, chassis, suspension, steering, airbags, lamps, and electronics. It has strong expertise in sensors, ECU sensor fusion, and software for safety control.
At the start of the 2022 school year, Hyundai Mobis gave members of the Yonsei University programming club Mologorithm a chance to tour the company and get hands-on field experience. The club members then visited the Hyundai Mobis headquarters.
Hyundai Mobis makes auto parts and manages them by dividing them into several groups. To prevent accidents, the sum of sizes of the parts in each group must not exceed , and the sum of weights must not exceed . To manage parts efficiently, the company also wants to minimize the number of groups. As part of the field experience, Hyundai Mobis asks club members to build this "Material Management Program." For club members without field experience, Hyundai Mobis provides in advance the "Classification Program" that goes into the Material Management Program.
Given the size and weight of each part to classify, build the "Material Management Program."
Input
The first line contains a positive integer , the number of material management runs. ()
Each run is given as follows.
- The first line contains a positive integer , the number of parts. ()
- The second line contains positive integers and , the size limit and weight limit of each group. ()
- The next lines each contain positive integers and , the size and weight of the -th part. (, )
Output
For each run, print the following.
- The first line prints
Material Management x. Herexis the number of the process, starting at 1 and increasing by 1. - The second line prints
Classification ---- End!, which marks the completion of the Classification Program developed by Hyundai Mobis.