Toxic Gene
문제
Benson the Rabbit’s plane has been overwhelmed by toxic bacteria, and he has to investigate it!
Benson the Rabbit has species of bacteria. Each of them falls into exactly one of types: Regular, Strong, Toxic. of them are Toxic. It is guaranteed that there is at least Toxic bacteria, i.e. t ≥ 1. Note that Benson does not know the value of .
Benson wants to identify the type of each bacteria. To analyze the bacteria, he can place bacteria specimens into a machine. He can specify the species of each bacteria, and he can add any number of each species into the machine, including . This forms a single sample. Due to size constraints, the total number of bacteria in a sample cannot exceed .
Each of the types of bacteria have the following properties:
- Regular bacteria will survive if there are no Toxic bacteria in the sample, and will die if there is at least one Toxic bacteria in the sample.
- Strong bacteria will always survive.
- Toxic bacteria produce a toxin which kills all bacteria in the sample that are not Strong bacteria. Toxic bacteria will always die.
After a sample is selected, the machine will tell Benson how many bacteria survived in total. Each use of the machine takes time, and Benson does not have a lot of time. He may only use the machine up to times. Help Benson determine for each bacteria, whether it is Regular, Strong or Toxic in as few samples as possible.