编程介的小学生 2018-11-13 16:25 采纳率: 20.5%
浏览 428
已采纳

条件搜索的一个题目,具体看题目下面的描述,谢谢

Problem Description
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.

Input
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.

Output
For each case, just print how many kinds living creatures we can separate.

Sample Input
3 10.0
AAA
AA
CCC

Sample Output
Case 1:
2

  • 写回答

1条回答 默认 最新

  • threenewbee 2018-12-09 12:35
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧