The correct answer is: The bacteria that survived were transformed with a plasmid that contains the resistance gene for ampicillin.
During the process of transformation, bacteria take up foreign DNA from their environment. This property of bacteria is used for DNA cloning technique where plasmids are transferred inside bacteria. Plasmids usually contain gene for the antibiotic resistance, and that is used for the selection of transformed bacteria (bacteria with a plasmid are antibiotic-resistant).