Vaccine Efficacy
InterviewTime limit1sMemory limit1024 MB
Given N participants marked as vaccinated or control and infected by strains A, B, C, compute each strain's vaccine efficacy as a percentage reduction in infection rate, or print Not Effective.
- Level
Easy3 of 10
- Topics
- Implementation, Math, Array
- Solved
- No attempts yet
Problem
A clinical trial is needed to determine the efficacy of a vaccine against a disease. Some participants are given the real vaccine, while others are given a placebo as the control group. The participants are tracked to determine whether they are infected by three different strains (A, B, and C) of a virus. The efficacy of the vaccine against infection by a particular strain is the percentage reduction of the infection rate of the vaccinated group compared to the control group.
For example, suppose that there are people in the vaccinated group, of which are infected by strain B. Then the infection rate is %. Further suppose that people are in the control group, and people are infected by strain B. Then the infection rate for the control group is %. Thus the vaccine efficacy against infection is approximately % (since % is a % percentage reduction of %). If the infection rate for a particular strain in the vaccinated group is not lower than that of the control group, the vaccine is not effective against infection by that strain.
What is the vaccine efficacy against infection by the three strains?
Input
The first line of input contains an integer (), the number of participants in the clinical trial.
The next lines describe the participants. Each of these lines contains a string of length four. Each letter is either 'Y' or 'N'. The first letter indicates whether the participant is vaccinated with the real vaccine, and the remaining three letters indicate whether the participant is infected by strain A, B, and C, respectively.
There is at least one participant in the vaccinated group and the control group. There is at least one participant in the control group infected by each strain (but they may be different participants).
Output
Display the vaccine efficacy against infection by strain A, B, and C in that order. If the vaccine is not effective against infection by a particular strain, display Not Effective for that strain instead. Answers with an absolute error or relative error of at most will be accepted.