欢迎访问我的个人网站==》 jiashubing.cn

随笔分类 -  OJ_UVA

摘要: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 贾树丙 阅读(273) 评论(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 贾树丙 阅读(890) 评论(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 贾树丙 阅读(414) 评论(0) 推荐(0) 编辑
摘要:History GradingBackgroundMany problems in Computer Science involve maximizing some measure according to constraints.Consider a history exam in which students are asked to put several historical events into chronological order. Students who order all the events correctly will receive full credit, but 阅读全文
posted @ 2013-04-29 20:25 贾树丙 阅读(508) 评论(0) 推荐(0) 编辑
摘要:Digit SumDescriptionThe security system forAssociated Computer Informatics Systems(ACIS) has an interesting test to check the identity for authorized personal. These persons have got a piece of software that allowed them to calculate, given two integer positive numbersMandN, what is the sum of the d 阅读全文
posted @ 2012-10-28 11:09 贾树丙 阅读(501) 评论(0) 推荐(0) 编辑