2013年5月3日

UVa 10453 - Make Palindrome 字符串dp

摘要: Problem AMake PalindromeInput:standard inputOutput:standard outputTime Limit:8 secondsBy definition palindrome is a string which is not changed when reversed. "MADAM" is a nice example of palindrome. It is an easy job to test whether a given string is a palindrome or not. But it may not be 阅读全文

posted @ 2013-05-03 20:35 电子幼体 阅读(163) 评论(0) 推荐(0) 编辑

UVa 10154 - Weights and Measures dp 降维

摘要: Problem F: Weights and MeasuresI know, up on top you are seeing great sights,But down at the bottom, we, too, should have rights.We turtles can't stand it. Our shells will all crack!Besides, we need food. We are starving!" groaned Mack.The ProblemMack, in an effort to avoid being cracked, h 阅读全文

posted @ 2013-05-03 19:49 电子幼体 阅读(203) 评论(0) 推荐(0) 编辑

UVa 11137 - Ingenuous Cubrency 背包

摘要: Problem I: Ingenuous CubrencyPeople in Cubeland use cubic coins. Not only the unit of currency is called acubebut also the coins are shaped like cubes and their values are cubes. Coins with values of all cubic numbers up to 9261 (= 213), i.e., coins with the denominations of 1, 8, 27,...,up to 9261c 阅读全文

posted @ 2013-05-03 15:19 电子幼体 阅读(209) 评论(0) 推荐(0) 编辑

导航