上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 40 下一页

2013年5月4日

UVa 10911 - Forming Quiz Teams 状态压缩dp

摘要: 4thIIUCInter-UniversityProgramming Contest, 2005GForming Quiz TeamsInput: standard inputOutput: standard outputProblemsetter:Sohel HafizYou have been given the job of forming the quiz teams for the next ‘MCA CPCI Quiz Championship’. There are2*Nstudents interested to participate and you have to form 阅读全文

posted @ 2013-05-04 20:42 电子幼体 阅读(209) 评论(0) 推荐(0) 编辑

UVa 11151 - Longest Palindrome 字符串dp

摘要: Write a programto determine the length of the longest palindrome you can get from a string.Input and OutputThe first line of input contains an integerT(≤ 60). Each of the nextTlines is a string, whose length is always less than 1000.For ≥90% of the test cases, string length ≤ 255.For each input stri 阅读全文

posted @ 2013-05-04 18:23 电子幼体 阅读(141) 评论(0) 推荐(0) 编辑

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 电子幼体 阅读(167) 评论(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 电子幼体 阅读(207) 评论(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 电子幼体 阅读(210) 评论(0) 推荐(0) 编辑

2013年5月2日

UVa 10617 - Again Palindrome 字符串dp

摘要: Problem IAgain PalindromesInput:Standard InputOutput:Standard OutputTime Limit:2 SecondsA palindorme is a sequence of one or more characters that reads the same from the left as it does from the right. For example,Z,TOTandMADAMare palindromes, butADAMis not.Given a sequenceSofNcapital latin letters. 阅读全文

posted @ 2013-05-02 20:19 电子幼体 阅读(183) 评论(0) 推荐(0) 编辑

UVa 10271 - Chopsticks dp

摘要: Problem CChopsticksInput:Standard InputOutput:Standard OutputIn China, people use a pair of chopsticks to get food on the table, but Mr. L is a bit different. He uses a set of three chopsticks -- one pair, plus an EXTRA long chopstick to get some big food by piercing it through the food. As you may 阅读全文

posted @ 2013-05-02 19:36 电子幼体 阅读(207) 评论(0) 推荐(0) 编辑

UVa 10739 - String to Palindrome 字符串dp

摘要: Problem HString to PalindromeInput:Standard InputOutput:Standard OutputTime Limit:1 SecondIn this problem you are asked to convert a string into a palindrome with minimum number of operations. The operations are described below:Here you’d have the ultimate freedom. You are allowed to:Add any charact 阅读全文

posted @ 2013-05-02 18:48 电子幼体 阅读(173) 评论(0) 推荐(0) 编辑

UVa 10651 - Pebble Solitaire 状态压缩 dp

摘要: Problem APebble SolitaireInput:standard inputOutput:standard outputTime Limit:1 secondPebble solitaire is an interesting game. This is a game where you are given a board with an arrangement of small cavities, initially all but one occupied by a pebble each. The aim of the game is to remove as many p 阅读全文

posted @ 2013-05-02 16:13 电子幼体 阅读(169) 评论(0) 推荐(0) 编辑

2013年4月30日

NEFU 688 Word maker! 网络流

摘要: Word maker!Time Limit 5000msMemory Limit 65536KdescriptionProbably, you have seen polyhedrons which have an English letter on each face of them. Little Ali has some of these polyhedrons and some words in his mind. We want to know how many of these words can be made by juxtaposing these polyhedrons. 阅读全文

posted @ 2013-04-30 20:41 电子幼体 阅读(173) 评论(0) 推荐(0) 编辑

上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 40 下一页

导航