随笔分类 -  DP

二分 + DP
摘要:A -MAGRIDTime Limit:10000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusAppoint description:DescriptionACM International Collegiate Programming Contest, Asia-Amritapuri Site, 2011Problem A: MAGRIDThanks a lot for helping Harry Potter in finding the Sorcerer's Stone of Immortality i 阅读全文

posted @ 2013-12-03 16:46 keep trying 阅读(248) 评论(0) 推荐(0)

E - Levko and Array DP + e二分
摘要:E -Levko and ArrayTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionLevko has an array that consists of integers:a1, a2, ... , an. But he doesn’t like this array at all.Levko thinks that the beauty of the arrayadirectly depends on value 阅读全文

posted @ 2013-12-03 14:13 keep trying 阅读(249) 评论(0) 推荐(0)

B - Free Market 涉及背包问题 + DP
摘要:B -Free MarketTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionJohn Doe has recently found a "Free Market" in his city — that is the place where you can exchange some of your possessions for other things for free.John knows t 阅读全文

posted @ 2013-12-01 21:22 keep trying 阅读(319) 评论(0) 推荐(0)

I - Apple Tree 树形dp
摘要:I -Apple TreeTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionYou are given a rooted tree withnvertices. In each leaf vertex there's a single integer — the number of apples in this vertex.Theweightof a subtree is the sum of all num 阅读全文

posted @ 2013-11-29 20:44 keep trying 阅读(221) 评论(0) 推荐(0)

C. Insertion Sort DP
摘要:C. Insertion Sorttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya is a beginner programmer. He has already mastered the basics of the C++ language and moved on to learning algorithms. The first algorithm he encountered was insertion sort. Pe 阅读全文

posted @ 2013-11-16 09:23 keep trying 阅读(269) 评论(0) 推荐(0)

Maximum Absurdity DP + 数学
摘要:Maximum AbsurdityTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionReforms continue entering Berland. For example, during yesterday sitting the Berland Parliament approved as much asnlaws (each law has been assigned a unique number from 阅读全文

posted @ 2013-11-09 18:38 keep trying 阅读(215) 评论(0) 推荐(0)

Aeroplane chess HDU 4405 概率期望DP
摘要:Aeroplane chessTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 945Accepted Submission(s): 646Problem DescriptionHzz loves aeroplane chess very much. The chess map contains N+1 grids labeled from 0 to N. Hzz starts at grid 0. For each step he throws 阅读全文

posted @ 2013-10-17 19:23 keep trying 阅读(230) 评论(0) 推荐(0)

Tug of War POJ 2576 DP(类似背包)
摘要:Tug of WarTime Limit:3000MSMemory Limit:65536KTotal Submissions:8085Accepted:2174DescriptionA tug of war is to be arranged at the local office picnic. For the tug of war, the picnickers must be divided into two teams. Each person must be on one team or the other; the number of people on the two team 阅读全文

posted @ 2013-10-15 16:30 keep trying 阅读(400) 评论(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-10-14 23:10 keep trying 阅读(296) 评论(0) 推荐(0)

导航