![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
aizu
ujn20161222
persistence
展开
-
Exhaustive Search dfs
Write a program which reads a sequence A of n elements and an integer M, and outputs "yes" if you can make M by adding elements in A, otherwise "no". You can use an element only once. You are giv...原创 2018-04-02 21:40:08 · 212 阅读 · 0 评论 -
Longest Common Subsequence _dp
For given two sequences X and Y, a sequence Z is a common subsequence of X and Y if Z is a subsequence of both X and Y. For example, if X={a,b,c,b,d,a,b} and Y={b,d,c,a,b,a}, the sequence {b,c,a} is a...原创 2018-04-02 22:26:47 · 303 阅读 · 0 评论 -
Matrix Chain Multiplication _dp
Matrix-chain Multiplication The goal of the matrix-chain multiplication problem is to find the most efficient way to multiply given n matrices M1,M2,M3,...,Mn. Write a program which reads dimen...原创 2018-04-03 15:21:07 · 114 阅读 · 0 评论 -
Coin Changing Problem _dp
Find the minimum number of coins to make change for n cents using coins of denominations d1, d2,.., dm. The coins can be used any number of times. Input n m d1 d2 ... dm Two integers n and m ...原创 2018-04-03 15:46:29 · 158 阅读 · 0 评论