2013年4月29日

UVa 10285 - Longest Run on a Snowboard 记忆化搜索

摘要: Problem CLongest Run on a SnowboardInput:standard inputOutput:standard outputTime Limit:5 secondsMemory Limit:32 MBMichael likes snowboarding. That's not very surprising, since snowboarding is really great. The bad thing is that in order to gain speed, the area must slide downwards. Another disa 阅读全文

posted @ 2013-04-29 21:27 电子幼体 阅读(209) 评论(0) 推荐(0) 编辑

UVa 10465 - Homer Simpson 背包

摘要: Return of the AztecsProblem C:Homer SimpsonTime Limit: 3 secondsMemory Limit: 32 MBHomer Simpson, a very smart guy, likes eating Krusty-burgers. It takes Homer m minutes to eat a Krusty- burger. However, there�s a new type of burger in Apu�s Kwik-e-Mart. Homer likes those too. It takes him n minutes 阅读全文

posted @ 2013-04-29 20:52 电子幼体 阅读(192) 评论(0) 推荐(0) 编辑

UVa 10130 - SuperSale 背包

摘要: SuperSaleThere is a SuperSale in a SuperHiperMarket. Every person can take only one object of each kind, i.e. one TV, one carrot, but for extra low price. We are going with a whole family to that SuperHiperMarket. Every person can take as many objects, as he/she can carry out from the SuperSale. We 阅读全文

posted @ 2013-04-29 18:49 电子幼体 阅读(149) 评论(0) 推荐(0) 编辑

UVa 562 - Dividing coins 背包

摘要: Dividing coinsIt's commonly known that the Dutch have invented copper-wire. Two Dutch men were fighting over a nickel, which was made of copper. They were both so eager to get it and the fighting was so fierce, they stretched the coin to great length and thus created copper-wire.Not commonly kno 阅读全文

posted @ 2013-04-29 16:44 电子幼体 阅读(128) 评论(0) 推荐(0) 编辑

UVa 357 - Let Me Count The Ways 背包

摘要: 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-29 16:30 电子幼体 阅读(200) 评论(0) 推荐(0) 编辑

UVa 147 - Dollars 背包

摘要: 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-29 16:17 电子幼体 阅读(141) 评论(0) 推荐(0) 编辑

NEFU English Game 字符串 dp 字典树

摘要: English GameTime Limit 1000msMemory Limit 65536Kdescription This English game is a simple English words connection game. The rules are as follows: there are N English words in a dictionary, and every word has its own weight v. There is a weight if the corresponding word is used. Now there is a ta... 阅读全文

posted @ 2013-04-29 11:41 电子幼体 阅读(259) 评论(0) 推荐(0) 编辑

导航