动态规划
程序与算法
我不聪明但很努力
展开
-
sicily 1001. Alphacode
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionAlice and Bob need to send secret messages to each other and are discussing ways to encode their messages: Alice: "Let's just u原创 2013-08-19 23:21:47 · 863 阅读 · 0 评论 -
Longest Common Subsequence: Dynamic Programming
Longest Common SubsequenceLongest Common Subsequence ( LCS ),中文可以譯做「最長共同子序列」。它和 LIS 是不一樣的。 LCS 是兩個 sequence ,在各自所有的 subsequence 之中,一模一樣而且最長的那個 subsequence 。s1:2 5 7 9 3 1 2s2:3 5 3 2 8以上例來看, s转载 2013-08-28 17:01:19 · 563 阅读 · 0 评论 -
sicily1687. Permutation
1687. PermutationConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionPermutation plays a very important role in Combinatorics. For example, 1 2 3 4 5 and 1 3 5 4 2 are both 5-perm原创 2013-08-28 19:41:11 · 679 阅读 · 0 评论 -
sicily1010. Zipper
Given three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The first two strings can be mixed arbitrarily, but each must stay in its original order. For example, consider forming "原创 2013-08-19 21:53:10 · 508 阅读 · 0 评论