Question 3 — Microorganism Simulation
Objective
Several microorganisms of different families have been arranged next to each other.
Knowing that a microorganism eats its neighbor if it is of a different family and smaller in size, write a program that returns the largest family and its size when the situation reaches an equilibrium. Process
- Each microorganism belongs to a family, defined by a letter,ts family, a separation space and its size.
The tests are designed so that at the end of the simulation there is always only one microorganism with the maximum size.
The maximum number of microorganisms given as input is 20.
求加米!
|