Problem

Given three strings , , and , we say that  and  can be interwoven into  if there is some substring of  made up of  and  as disjoint subsequences.

For example, the strings "" and "" can be interwoven into "". However, they cannot be interwoven into "" because of the appearance of the four 'A's in the middle of the subsequences. Similarly, even though both "" is a shortest common supersequence of  and , it is not possible to interweave these two strings into "" because the two desired subsequences must be disjoint; see “Interleaving Two Motifs” for details on finding a shortest common supersequence of two strings.

Given: A text DNA string  of length at most 10 kbp, followed by a collection of  () DNA strings of length at most 10 bp acting as patterns.

Return: An  matrix  for which  if the th and th pattern strings can be interwoven into  and  otherwise.

给定三个字符串 , 和 ,我们说  和 可以交织成 如果有一些子字符串  由...组成  和 作为不相交的子序列

例如,字符串““和”“可以交织成”“。但是,不能将它们交织为““是因为在子序列中间出现了四个'A'。类似地,即使这两个'“是最短共同超序列的  和 ,则无法将这两个字符串交织成“”,因为两个所需的子序列必须不相交;有关找到两个字符串的最短公共超序列的详细信息,请参见“交织两个基序”

鉴于:一个文本 DNA串 的长度最大为10 kbp,随后是 (DNA串的长度最多为10 bp作为模式

返回:一个 矩阵  为此  如果 和 图案线可以交织成  和  除此以外。

Sample Dataset

GACCACGGTT
ACAG
GT
CCG

Sample Output

0 0 1
0 1 0
1 0 0
Logo

昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链

更多推荐