
动态规划——概率 DP 与期望 DP
Alex_McAvoy
想要成为渔夫的猎手
展开
-
Robberies(HDU-2955)
Problem Description The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided...原创 2018-03-31 21:36:50 · 292 阅读 · 0 评论 -
I NEED A OFFER!(HDU-1203)
Problem Description Speakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并且Speakless估...原创 2018-03-31 21:39:18 · 1010 阅读 · 0 评论 -
Kejin Player(HDU-6656)
Problem DescriptionCuber QQ always envies those Kejin players, who pay a lot of RMB to get a higher level in the game. So he worked so hard that you are now the game designer of this game. He decid...原创 2019-10-25 19:49:59 · 565 阅读 · 0 评论 -
Everything Is Generated In Equal Probability(HDU-6595)
Problem DescriptionOne day, Y_UME got an integerNand an interesting program which is shown below:Y_UME wants to play with this program. Firstly, he randomly generates an integern∈[1,N]in...原创 2019-09-24 21:03:50 · 430 阅读 · 0 评论 -
Robots(2019 ACM-ICPC 南京赛区网络赛 D)
Problem DescriptionGiven a directed graph with no loops which starts at node1and ends at noden.There is a robot who starts at1, and will go to one of adjacent nodes or stand still withequal ...转载 2019-09-02 20:49:07 · 528 阅读 · 0 评论 -
Piglet's Birthday(CF-248E)
Problem DescriptionPiglet has got a birthday today. His friend Winnie the Pooh wants to make the best present for him — a honey pot. Of course Winnie realizes that he won't manage to get the full p...原创 2019-08-12 12:09:05 · 443 阅读 · 0 评论 -
Let's Play Osu!(CF-236D)
Problem DescriptionYou're playing a game called Osu! Here's a simplified version of it. There are n clicks in a game. For each click there are two outcomes: correct or bad. Let us denote correct as...原创 2019-08-02 10:00:17 · 656 阅读 · 0 评论 -
Dice (III)(LightOJ-1248)
Problem DescriptionGiven a dice with n sides, you have to find the expected number of times you have to throw that dice to see all its faces at least once. Assume that the dice is fair, that means ...原创 2019-04-03 09:14:16 · 796 阅读 · 1 评论 -
Just another Robbery(LightOJ-1079)
Problem DescriptionAs Harry Potter series is over, Harry has no job. Since he wants to make quick money, (he wants everything quick!) so he decided to rob banks. He wants to make a calculated risk,...原创 2019-04-02 22:20:55 · 536 阅读 · 0 评论 -
Discovering Gold(LightOJ-1030)
Problem DescriptionYou are in a cave, a long cave! The cave can be represented by a 1 x N grid. Each cell of the cave can contain any amount of gold.Initially you are in position 1. Now each turn...原创 2019-04-02 18:50:51 · 937 阅读 · 0 评论 -
动态规划 —— 概率 DP 与期望 DP
【概述】由于概率和期望具有线性性质,使得可以在概率和期望之间建立一定的递推关系,这样就可以通过动态规划来解决一些概率问题,例如概率和期望的最值问题就常常使用概率 DP、期望 DP 来解决。与其他的动态规划一样,合理的选择状态以及高效的状态转移方程是关键,选择合适的状态不仅可以提高效率,而且可以保证动态规划所必须的无后效性。一般来说,将问题直接作为状态是最好的,当找到正确的状态定义后,转...原创 2019-04-02 15:28:37 · 3468 阅读 · 1 评论