![](https://img-blog.csdnimg.cn/20190927151124774.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
动态规划-期望、概率DP
动态规划
Stephencurry‘s csdn
这个作者很懒,什么都没留下…
展开
-
Chocolate (POJ-1322)(概率DP)
In 2100, ACM chocolate will be one of the favorite foods in the world."Green, orange, brown, red...", colorful sugar-coated shell maybe is the most attractive feature of ACM chocolate. How many color...原创 2020-04-20 11:34:47 · 281 阅读 · 1 评论 -
Island of Survival (LightOJ-1265) (概率DP)
You are in a reality show, and the show is way too real that they threw into an island. Only two kinds of animals are in the island, the tigers and the deer. Though unfortunate but the truth is that, ...原创 2020-02-01 11:12:18 · 168 阅读 · 0 评论 -
Dice (III) (LightOJ-1248) (概率DP)
Given a dice withnsides, 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 when you throw the dic...原创 2020-02-01 10:23:44 · 183 阅读 · 0 评论 -
Just another Robbery(LightOJ-1079) 概率DP
As 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, and grab as much mone...原创 2020-01-23 11:38:52 · 172 阅读 · 1 评论 -
Discovering Gold (LightOJ-1030)期望DP
You are in a cave, a long cave! The cave can be represented by a1 x Ngrid. Each cell of the cave can contain any amount of gold.Initially you are in position1. Now each turn you throw a perfect6...原创 2020-01-23 10:34:45 · 147 阅读 · 1 评论 -
A Dangerous Maze (LightOJ-1027)(期望DP)
You are in a maze; seeingndoors in front of you in beginning. You can choose any door you like. The probability for choosing a door is equal for all doors.If you choose theithdoor, it can either...原创 2020-01-22 11:28:30 · 152 阅读 · 0 评论 -
Randomized Fibonacci (HihoCoder-1164)期望DP
Consider the following way to generate a new "randomized" fibonacci sequence.a0= 1, ai= aj+ ak, i > 0, j and k are picked randomly from all integers in the interval [0, i-1] (j and k are indep...原创 2020-01-22 10:44:53 · 245 阅读 · 0 评论 -
Check the difficulty of problems (POJ-2151)概率DP
Organizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually expect the contest result satisfy the following two terms:1. All of the teams so...原创 2020-01-21 11:26:50 · 169 阅读 · 0 评论 -
King Arthur's Birthday Celebration (POJ-3682)期望DP(二项分布)
King Arthur is an narcissist who intends to spare no coins to celebrate his comingK-th birthday. The luxurious celebration will start on his birthday and King Arthur decides to let fate tell when to ...原创 2020-01-21 10:22:22 · 215 阅读 · 0 评论 -
LOOPS (HDU-3853)(期望DP)
Akemi Homura is a Mahou Shoujo (Puella Magi/Magical Girl).Homura wants to help her friend Madoka save the world. But because of the plot of the Boss Incubator, she is trapped in a labyrinth called LO...原创 2020-01-20 11:33:56 · 215 阅读 · 0 评论 -
Maze (HDU-4035)概率DP
When wake up, lxhgww find himself in a huge maze.The maze consisted by N rooms and tunnels connecting these rooms. Each pair of rooms is connected by one and only one path. Initially, lxhgww is in ro...原创 2020-01-20 10:03:11 · 224 阅读 · 0 评论 -
Favorite Dice (SPOJ-FAVDICE)期望DP
BuggyD loves to carry his favorite die around. Perhaps you wonder why it's his favorite? Well, his die is magical and can be transformed into an N-sided unbiased die with the push of a button. Now Bug...原创 2020-01-19 09:59:59 · 213 阅读 · 1 评论 -
Crossing Rivers (UVA-12230 )期望DP
You live in a village but work in another village. You decided to follow the straight path between your house (A) and the working place (B), but there are several rivers you need to cross. Assume B is...原创 2020-01-18 17:08:07 · 110 阅读 · 0 评论 -
Passage (HDU-3366 ) 概率DP
Bill is a millionaire. But unfortunately he was trapped in a castle. There are only n passages to go out. For any passage i (1<=i<=n), Pi (0<=Pi<=1) denotes the probability that Bill will ...原创 2020-01-18 16:14:54 · 192 阅读 · 0 评论 -
Bag of mice (CodeForces-148D)概率DP
The dragon and the princess are arguing about what to do on the New Year's Eve. The dragon suggests flying to the mountains to watch fairies dancing in the moonlight, while the princess thinks they sh...原创 2020-01-18 10:51:08 · 241 阅读 · 0 评论 -
Collecting Bugs (POJ-2096) 纯期望DP
Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collects software bugs. When Ivan gets a new program, he classifies all possible bugs into n ...原创 2020-01-18 10:00:28 · 190 阅读 · 0 评论 -
Race to 1 Again(LightOJ-1038) 纯概率DP
Rimi learned a new thing about integers, which is - any positive integer greater than1can be divided by its divisors. So, he is now playing with this property. He selects a numberN. And he calls th...原创 2020-01-17 11:29:02 · 201 阅读 · 0 评论 -
Aeroplane chess(HDU-4405)(概率DP)
Hzz 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 a dice(a dice have six faces with equal probability to face up ...原创 2020-01-17 10:50:19 · 173 阅读 · 0 评论 -
(概率DP)正向推概率,反向推期望
转载自大神博客:传送门这个思想真是太经典了!为什么要正向推概率,反向推期望呢?首先,我们看看什么是条件概率。事件A在另外一个事件B已经发生条件下的发生概率。条件概率表示为P(A|B),读作“在B条件下A的概率”。然后,我们再看看什么是贝叶斯公式。算了,我就不扯了,自己点进去看吧。现在,正文来了。拿飞行棋来说,可以先看看我的博客,我写了3种方法算从0到n的平均步数,很...转载 2020-01-17 10:17:57 · 953 阅读 · 0 评论