
dp动态规划
文章平均质量分 77
xtulollipop
这个作者很懒,什么都没留下…
展开
-
I NEED A OFFER! hdu1203
Description Speakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并且Speakless估计了他得到这个学校offe原创 2015-07-26 16:04:15 · 602 阅读 · 0 评论 -
hdu5492Find a path+DP
Problem Description Frog fell into a maze. This maze is a rectangle containing N rows and M columns. Each grid in this maze contains a number, which is called the magic value. Frog now stays at grid (原创 2016-09-01 21:42:23 · 502 阅读 · 0 评论 -
hdu5800To My Girlfriend+DP
Problem Description Dear GuoI never forget the moment I met with you.You carefully asked me: “I have a very difficult problem. Can you teach me?”.I replied with a smile, “of course”.”I have n items, t原创 2016-08-06 16:48:45 · 453 阅读 · 0 评论 -
hduThe All-purpose Zero+LIS
啊啊喔。啊啊哦。好久没DP,没DP,不会了啊,不会了啊。orz(以防万一,膜拜边上的两位菊苣)。。LIS:以前写的都是O(n2n^2)的复杂度。今弃嫌。换一nlog(n)nlog(n) 的写法。调试几小时,O啦。 严格递增/非严格递增int LIS(int A[],int n){ memset(d,0,sizeof(d)); memset(g,INF,sizeof(g));原创 2016-08-01 20:11:36 · 322 阅读 · 0 评论 -
Food Delivery zoj3469 区间dp
Description When we are focusing on solving problems, we usually prefer to stay in front of computers rather than go out for lunch. At this time, we may call for food delivery.Suppose there are N peop原创 2015-08-03 14:13:09 · 573 阅读 · 0 评论 -
Crossed Matchings zoj1425 dp
DescriptionThere are two rows of positive integer numbers. We can draw one line segment between any two equal numbers, with values r, if one of them is located in the first row and the other one i原创 2015-08-03 14:10:19 · 646 阅读 · 0 评论 -
Happy Programming Contest zoj3703 dp
Description In Zhejiang University Programming Contest, a team is called “couple team” if it consists of only two students loving each other. In the contest, the team will get a lovely balloon with un原创 2015-08-03 14:08:07 · 551 阅读 · 0 评论 -
BUY LOW, BUY LOWER poj1952
Description The advice to “buy low” is half the formula to success in the bovine stock market.To be considered a great investor you must also follow this problems’ advice: “Buy l原创 2015-07-22 21:38:24 · 537 阅读 · 0 评论 -
Alignment poj1836
Description In the army, a platoon is composed by n soldiers. During the morning inspection, the soldiers are aligned in a straight line in front of the captain. The captain is not satisfied with the原创 2015-07-22 21:25:59 · 342 阅读 · 0 评论 -
zoj3471 Most Powerful 状压dp
Description Recently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atoms collide, one of them disappears and a l原创 2015-08-26 21:10:58 · 334 阅读 · 0 评论 -
zoj1986 Bridging Signals (dp,最长递增序列,LIS)
A - Bridging Signals Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu SubmitStatusPracticeZOJ 1986 Description ‘Oh no, they’ve done it again’, cries the chief designer at原创 2015-08-26 20:30:34 · 803 阅读 · 0 评论 -
zoj 2297 Survival 状压dp
Description The King of Fighter 97 (KOF97) is an electronic game of wrestling type. Once it was fashionable among youths. The game is amused. However, playing by oneself is not as excited as with frie原创 2015-08-26 20:10:30 · 857 阅读 · 0 评论 -
zoj2059 The Twin Towers (dp)
Description Twin towers we see you standing tall, though a building’s lost our faith will never fall. Twin towers the world hears your call, though you’re gone it only strengthens our resolve. We原创 2015-08-26 20:38:55 · 913 阅读 · 0 评论 -
hdu5418 BestCoder Round #52 (div.2) Victor and World ( floyd+状压dp)
Problem Description After trying hard for many years, Victor has finally received a pilot license. To have a celebration, he intends to buy himself an airplane and fly around the world. There are n co原创 2015-08-26 20:20:50 · 823 阅读 · 0 评论 -
hdu5904LCIS+dp+最长公共子串
LCIS Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 501 Accepted Submission(s): 231Problem Description Alex has two sequences a1,a2,…,an原创 2016-09-25 21:47:15 · 350 阅读 · 0 评论