欢迎访问我的个人网站==》 jiashubing.cn
摘要: DollarsNew Zealand currency consists of $100, $50, $20, $10, and $5 notes and $2, $1, 50c, 20c, 10c and 5c coins. Write a program that will determine, for any given amount, in how many ways that amount may be made up. Changing the order of listing does not increase the count. Thus 20c may be made up 阅读全文
posted @ 2013-04-30 15:26 贾树丙 阅读(328) 评论(0) 推荐(0) 编辑
摘要: Let Me Count The WaysAfter making a purchase at a large department store, Mel's change was 17 cents. He received 1 dime, 1 nickel, and 2 pennies. Later that day, he was shopping at a convenience store. Again his change was 17 cents. This time he received 2 nickels and 7 pennies. He began to wond 阅读全文
posted @ 2013-04-30 14:46 贾树丙 阅读(271) 评论(0) 推荐(0) 编辑
摘要: Coin ChangeSuppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins for a given amount of money.For example, if we have 11 cents, then we can make changes with one 10-cent coin and one 1-cent coin, two 5-cent coins and one 1-cent coi 阅读全文
posted @ 2013-04-30 11:40 贾树丙 阅读(888) 评论(0) 推荐(0) 编辑
摘要: Longest Common SubsequenceSequence 1:Sequence 2:Given two sequences of characters, print the length of the longest common subsequence of both sequences. For example, the longest common subsequence of the following two sequences:abcdghaedfhrisadhof length 3.Input consists of pairs of lines. The first 阅读全文
posted @ 2013-04-30 11:17 贾树丙 阅读(413) 评论(0) 推荐(0) 编辑