随笔分类 - 贪心
摘要:H. DistributionTime Limit:1500MSDescriptionOne day, Obama dreamed that he and Clinton went together to steal jewellery, got n pieces of the jewellerys. How to divide stolen jewellerys became a problem,because the estimated value of each pieces of the jewellery are not the same to them.If the total v
阅读全文
摘要:DNA-AND-DNAProblem Description生物学家们发现了一个奇怪的DNA分子,可以将它们看作一个由集合{A,B} 中的元素组成的N个字符的序列。由于一系列的突变使得DNA链只包含A。生物学家发现这很奇怪,所以他们开始研究更详细的基因突变。他们发现了两种类型的基因突变。一种类型是改变单个字符的序列(A→B或B→A)。第二类改变了整个序列的前缀,从1到K(1和N之间)。计算数量尽可能少的突变,可以是起始分子转化到它的最终状态(只包含A字符)。突变可以在任何顺序发生。Input输入有多组数据。输入的第一行包含一个正整数N(1≤N≤1000 000),表示分子的长度。输入第二行包含
阅读全文

浙公网安备 33010602011771号