随笔分类 - 动态规划(DP)
状态压缩DP、树形DP、概率DP、斜率DP、区间DP、插头DP、背包
摘要:题目:一只袋鼠要从河这边跳到河对岸,河很宽,但是河中间打了很多桩子,每隔一米就有一个,每个桩子上都有一个弹簧,袋鼠跳到弹簧上就可以跳的更远,每个弹簧力量不同,用一个数字代表它的力量,如果弹簧力量为5,就代表袋鼠下一跳最多能够跳5米,如果为0,就会陷进去无法继续跳跃,河流一共N米宽,袋鼠初始位置就在第
阅读全文
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5900 Problem Description Every school has some legends, Northeastern University is the same.Enter from
阅读全文
摘要:题目链接 http://vjudge.net/contest/132391#problem/G Description standard input/outputStatements — It' s a good game, — Princess said pensively. It was cle
阅读全文
摘要:题目链接 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2988 problem Description Flatland governme
阅读全文
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=4745 题意:两只兔子,在n块围成一个环形的石头上跳跃,每块石头有一个权值ai,一只从左往右跳,一只从右往左跳,每跳一次,两只兔子所在的石头的权值都要相等,在一圈内(各自不能超过各自的起点,也
阅读全文
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=4283 Problem Description The TV shows such as You Are the One has been very popular. In order to
阅读全文
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=4293 Problem Description After the regional contest, all the ACMers are walking alone a very long
阅读全文
摘要:题目链接 http://poj.org/problem?id=1141 Description Let us define a regular brackets sequence in the following way: 1. Empty sequence is a regular sequenc
阅读全文
摘要:题目链接 http://lightoj.com/volume_showproblem.php?problem=1031 Description You are playing a two player game. Initially there are n integer numbers in an
阅读全文
摘要:题目链接 http://codeforces.com/contest/711/problem/C Description ZS the Coder and Chris the Baboon has arrived at Udayland! They walked in the park where
阅读全文
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=5410 Problem Description Today is CRB's birthday. His mom decided to buy many presents for her lo
阅读全文
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=5396 Problem Description Teacher Mai has n numbers a1,a2,⋯,anand n−1 operators("+", "-" or "*")op
阅读全文
摘要:题目链接 http://acm.hust.edu.cn/vjudge/contest/130883#problem/C Problem Description Zero Escape, is a visual novel adventure video game directed by Kotaro
阅读全文
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=5379 Problem Description Little sun is an artist. Today he is playing mahjong alone. He suddenly
阅读全文
摘要:原题链接 Problem Description You may heard of the Joseph Problem, the story comes from a Jewish historian living in 1st century. He and his 40 comrade sol
阅读全文
摘要:原题链接 描述 有N堆石子排成一排,每堆石子有一定的数量。现要将N堆石子并成为一堆。合并的过程只能每次将相邻的两堆石子堆成一堆,每次合并花费的代价为这两堆石子的和,经过N-1次合并后成为一堆。求出总的代价最小值。 对于石子合并问题,有一个最好的算法,那就是GarsiaWachs算法。时间复杂度为O(
阅读全文
摘要:题目链接 描述 暑假来了,hrdv 又要留学校在参加ACM集训了,集训的生活非常Happy(ps:你懂得),可是他最近遇到了一个难题,让他百思不得其解,他非常郁闷。。亲爱的你能帮帮他吗? 问题是我们经常见到的整数划分,给出两个整数 n , m ,要求在 n 中加入m - 1 个乘号,将n分成m段,求
阅读全文
摘要:2016暑假多校联合 To My Girlfriend Problem Description Dear GuoI never forget the moment I met with you.You carefully asked me: "I have a very difficult prob
阅读全文
摘要:2016暑假多校联合 Another Meaning Problem Description As is known to all, in many cases, a word has two meanings. Such as “hehe”, which not only means “hehe”
阅读全文
摘要:ACdream 1214 矩阵连乘 Problem Description You might have noticed that there is the new fashion among rich people to have their yards tiled with black and
阅读全文

浙公网安备 33010602011771号