Toxic Gene
시간 제한1초메모리 제한1024 MB
한 번에 300마리까지, 최대 600번 질의할 수 있는 기계로 생존자 수만 보고 n종의 박테리아를 보통, 강함, 독성으로 분류한다.
문제
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.. 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.
예제
이 문제는 공개된 예제가 없습니다.