QOJ.ac

QOJ

Limite de temps : 1 s Limite de mémoire : 1024 MB Points totaux : 100

#3653. 疫苗效力

Statistiques

为了确定疫苗对某种疾病的疗效,需要进行临床试验。一些参与者接种了真实疫苗,而另一些参与者则作为对照组接种了安慰剂。研究人员会对参与者进行跟踪,以确定他们是否感染了三种不同的病毒毒株(A、B 和 C)。疫苗对特定毒株的感染疗效,即为接种组相对于对照组的感染率降低百分比。

例如,假设接种组有 40 人,其中 8 人感染了 B 毒株,那么感染率为 20%。进一步假设对照组有 50 人,其中 30 人感染了 B 毒株,那么对照组的感染率为 60%。因此,疫苗对该感染的疗效约为 66.67%(因为 20% 是 60% 的 66.67% 降低率)。如果接种组中某种毒株的感染率不低于对照组的感染率,则说明疫苗对该毒株的感染无效。

请问疫苗对这三种毒株的感染疗效分别是多少?

输入格式

输入的第一行包含一个整数 $N$ ($2 \le N \le 10\,000$),表示临床试验的参与者人数。

接下来的 $N$ 行描述了参与者的情况。每行包含一个长度为 4 的字符串。每个字母要么是 ‘Y’,要么是 ‘N’。第一个字母表示参与者是否接种了真实疫苗,其余三个字母分别表示参与者是否感染了 A、B 和 C 毒株。

接种组和对照组中至少各有一名参与者。对照组中每种毒株至少有一名感染者(但可能是不同的参与者)。

输出格式

按顺序输出疫苗对 A、B 和 C 毒株的感染疗效。如果疫苗对某种毒株的感染无效,则在该毒株对应的位置输出 Not Effective。绝对误差或相对误差不超过 $10^{-2}$ 的答案将被接受。

样例

输入 1

10
NYNY
NNYY
NYYY
NYYN
NNNY
YYNN
YYYN
YYNY
YYNN
YYNY

输出 1

Not Effective
66.666667
50.000000

输入 2

8
NYYY
NYYY
NYYY
NYYY
YNNN
YNNN
YNNN
YNNN

输出 2

100.000000
100.000000
100.000000

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.