概率期望
无
旺 崽
这个作者很懒,什么都没留下…
展开
-
HDUOJ 6838 Battle for Wosneth
HDUOJ 6838 Battle for Wosneth 题目链接 Problem Description 你在打游戏的时候碰到了如下问题: 有两个人记作Alice和Bob,Bob的生命值为m,Alice的生命值很高,所以可以认为是无限的。两个人的攻击命中率分别为p%,q%。两个人轮流攻击对方。从Alice开始攻击,每次攻击的时候,如果Alice命中,那么能让对方的生命值减低1,同时自己的生命值能恢复1,如果Bob命中,那么能让对方的生命值减低1,注意Bob不会自己回血。 直到Bob的血量变为0,游戏结束原创 2020-08-10 21:12:30 · 2458 阅读 · 0 评论 -
HDUOJ 6747 Rotate
HDUOJ 6747 Rotate 题目链接 Problem Description 我们有一个圈,从内到外一共被分成了 n 个环,中间是空的。 我们把从外到内第 i 层环平分成 a[i] 份,其中 a[i] 是偶数,我们把这 a[i] 份黑白染色,第奇数个染成黑色,第偶数个染成白色。 现在我们旋转每一层,每一层都会等概率随机到一个中止位置。 问黑色的联通块数目的期望。两块黑色的区域有交点即算联通。层之间的旋转是相互独立的。 Input 第一行一个正整数 test(1≤test≤10) 表示数据组数。 对于原创 2020-07-20 10:38:53 · 2328 阅读 · 0 评论 -
LightOJ 1079 Just another Robbery
LightOJ 1079 Just another Robbery 题目链接 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 money as possible. Bu原创 2020-07-11 16:25:22 · 2343 阅读 · 0 评论 -
LightOJ 1038 Race to 1 Again
LightOJ 1038 Race to 1 Again 题目链接 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 this D. In each turn h原创 2020-07-10 15:09:18 · 2296 阅读 · 0 评论 -
LightOJ 1030 Discovering Gold
LightOJ 1030 Discovering Gold You 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 you throw a perfect 6 sided dice. If you get X i原创 2020-07-09 15:31:48 · 2324 阅读 · 0 评论 -
LightOJ 10271027 A Dangerous Maze
LightOJ 10271027 A Dangerous Maze 题目链接 You are in a maze; seeing n doors 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 the ith door, it can either take you back to原创 2020-07-08 20:51:44 · 2326 阅读 · 0 评论