Rosalind第77题:Counting Quartets

Problem

A quartet  is consistent with a binary tree  if the quartet can be inferred from one of the splits of  (see “Quartets” for a description of inferring quartets from splits).

Let  denote the total number of quartets that are consistent with .

Given: A positive integer  (), followed by an unrooted binary tree  in Newick format on  taxa.

Return: The value of  modulo 1,000,000.

四重奏 是一致二叉树  如果四重奏可以从一个推断分裂的(有关从分割中推断四重奏的说明,请参见“四重奏”)。

让  表示符合的四重奏总数 。

给定:正整数 (),然后是无根的二叉树  在Newick格式上 分类单元。

返回值: 1,000,00

Sample Dataset

6
(lobster,(cat,dog),(caterpillar,(elephant,mouse)));

Sample Output

15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值