当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2144:Evolution

题目描述
  Every kind of living creatures has a kind of DNA. The nucleotide bases from which DNA is built are A (adenine), C (cytosine), G (guanine), and T (thymine). Sometimes if two DNA of two living creatures have the same substring, and the length is beyond a certain percentage of the whole length, we many consider whether the two living creatures have the same ancestor. And we can separate them into a certain species temporarily for our research, and we say the two living creatures are similar Make sure if A is similar with B, and B is similar with C, but C is not similar with A, we also separate A, B and C into a kind, for during the evolution, there happens aberrance.
Now we have some kinds of living creatures and their DNA, just tell us how many kinds of living creatures we can separate.
输入解释
  There are a lot of cases. In each case, in the first line there are two numbers N and P. N means the number of kinds of living creatures. If two DNA are similar, there exist a substring, and its length is beyond the percentage of any DNA of the two, and P is just the percentage. And 1<=N<=100, and 1<=P<100 (P is 100, which means two DNA are similar if and only if they are the same, so we make sure P is smaller than 100). The length of each DNA won't exceed 100.
输出解释
  For each case, just print how many kinds living creatures we can separate.
输入样例
3 10.0
AAA
AA
CCC
输出样例
Case 1:
2
来自杭电HDUOJ的附加信息
Author wangye
Recommend 威士忌

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-2144

最后修改于 2020-10-25T22:50:52+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
20000/5000MS(Java/Others) 32768/32768K(Java/Others)