- 博客(9)
- 收藏
- 关注
原创 Happy Necklace hdu 6030 (BM算法)
Little Q wants to buy a necklace for his girlfriend. Necklaces are single strings composed of multiple red and blue beads. Little Q desperately wants to impress his girlfriend, he knows that she will ...
2018-10-25 15:38:19 217
转载 A Dangerous Maze (II)
https://blog.csdn.net/qq_31759205/article/details/54710164 题解:期望dp,设正确的门有a个,平均耗时为sum1,错误的门有b个,平均耗时为sum2。 状态转移分2部分: ①当i==k时,即已经记住k次走错的门, ②当i<k时, #include<bits/stdc++.h> using namespace ...
2018-10-22 16:16:13 155
原创 Batting Practice LightOJ - 1408
After being all out for 58 and 78 in two matches in the most prestigious tournament in the world, the coach of a certain national cricket team was very upset. He decided to make the batsmen practice a...
2018-10-19 11:11:10 162
原创 Lights inside 3D Grid LightOJ - 1284
题解:概率计数。因为是求期望值,考虑每个点对答案的贡献:对每个点是亮着的概率求和就是所求期望。 那么每个点亮着的概率为多少呢?根据题意,对于点(x,y,z)只有当被选中的2个点(x1,y1,z1),(x2,y2,z2), 满足x1<=x<=x2且y1<=y<=y2且z1<=z<=z2时,该点的状态才会改变,因此对于每一维, 在区间内的概率=1-区间在该点的...
2018-10-17 18:37:29 126
原创 Beating the Dataset LightOJ - 1274
You are in a contest, and unfortunately you don't have much time. You have one problem in hand; you just glanced at the sample output and found that it just wants 'YES' or 'NO'. So, you have made anot...
2018-10-17 10:48:25 268
原创 Dice (III) LightOJ - 1248
Given 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 when you throw the dic...
2018-10-14 19:52:46 120
原创 Birthday Paradox LightOJ - 1104
Sometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose you are in a party where there are 23 people including you. What is the probability...
2018-10-14 17:01:49 130
原创 Just another Robbery LightOJ - 1079(概率)
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...
2018-10-13 20:33:56 124
原创 Race to 1 Again LightOJ - 1038
Rimi learned a new thing about integers, which is - any positive integer greater than 1 can be divided by its divisors. So, he is now playing with this property. He selects a number N. And he calls th...
2018-10-12 11:03:51 148
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人