給一正整數列,求其最長的遞增與遞減子數列。例如數列 5, 1, 4, 2, 3 的最長遞增數列為 1, 2, 3,最長遞減數列則為 5, 4, 3。

Given: A positive integer n≤10000 followed by a permutation π of length n.

Return: A longest increasing subsequence of π , followed by a longest decreasing subsequence of π.

(https://rosalind.info/problems/lgis/)

閱讀全文 »

給定一 FASTA 檔案,內含數條由 A、C、G、T 組成的字串,求這些字串共享的最長子字串。

A common substring of a collection of strings is a substring of every member of the collection. We say that a common substring is a longest common substring if there does not exist a longer common substring. For example, “CG” is a common substring of “ACGTACGT” and “AACCGTATA”, but it is not as long as possible; in this case, “CGTA” is a longest common substring of “ACGTACGT” and “AACCGTATA”.
Note that the longest common substring is not necessarily unique; for a simple example, “AA” and “CC” are both longest common substrings of “AACC” and “CCAA”.

Given: A collection of k (k≤100) DNA strings of length at most 1 kbp each in FASTA format.

Return: A longest common substring of the collection. (If multiple solutions exist, you may return any single solution.)

(https://rosalind.info/problems/lcsm/)

閱讀全文 »

給定字符序列 $\mathscr{A}$,求由這些字符組成且長度小於等於 k 的所有字串。這些字串須依照 $\mathscr{A}$ 字典序排列。

Given: A permutation of at most 12 symbols defining an ordered alphabet $\mathscr{A}$ and a positive integer n (n≤4).

Return: All strings of length at most n formed from $\mathscr{A}$, ordered lexicographically. (Note: As in “Enumerating k-mers Lexicographically”, alphabet order is based on the order in which the symbols are given.)

(https://rosalind.info/problems/lexv/)

閱讀全文 »

給定字符序列 $\mathscr{A}$,求由這些字符組成且長度為 k 的所有字串。這些字串須依照 $\mathscr{A}$ 字典序排列。

Given: A permutation of at most 12 symbols defining an ordered alphabet $\mathscr{A}$ and a positive integer n (n≤4).

Return: All strings of length at most n formed from $\mathscr{A}$ , ordered lexicographically. (Note: As in “Enumerating k-mers Lexicographically”, alphabet order is based on the order in which the symbols are given.)

(https://rosalind.info/problems/lexv/)

閱讀全文 »

給定一正整數 n,求包含數字 1 到 n 與 -1 到 -n 的所有可能數列與其總數。

A signed permutation of length n is some ordering of the positive integers {1,2,…,n} in which each integer is then provided with either a positive or negative sign (for the sake of simplicity, we omit the positive sign). For example, π=(5,−3,−2,1,4) is a signed permutation of length 5

Given: A positive integer n≤6

Return: The total number of signed permutations of length n, followed by a list of all such permutations (you may list the signed permutations in any order).

閱讀全文 »

給定一正整數 n,求包含數字 1 到 n 的所有可能數列與其總數。

A permutation of length n is an ordering of the positive integers {1,2,…,n} . For example, π=(5,3,2,1,4) is a permutation of length 5.

Given: A positive integer n≤7 .

Return: The total number of permutations of length n , followed by a list of all such permutations (in any order).

(https://rosalind.info/problems/perm/)

閱讀全文 »

小說1是以主角朋友的紀錄呈現。開頭場景類似電影《來自地球的人》,是一場舉行在主角家裡的沙龍。當一夥人正熱烈討論著時空本質時,主角現身向他們展示了正在打造的時光機器。不過要到主角衣衫襤褸,渾身是傷地出現在再次造訪的友人面前,讀者才得以讀到由敘事者轉述,主角經歷的未來冒險。

閱讀全文 »
0%