LightOj_1027 A Dangerous Maze】的更多相关文章

题目链接 题意: 你在一个迷宫里, 开始的时候你面前有n个门, 选择每个门的概率相等, 有两种结果: 1)回到|x|分钟之前(x为负时) 2)x分钟之后出迷宫(x为正时) 每次回到|x|分钟之前, 你都记不得你曾经选过哪扇门 问走出迷宫所用时间的期望. 思路: 因为每次都不记得曾经的选择, 所以每次的期望都是一样的. 设,T1为每次走出去所用时间的期望, T2为回到之前所用时间的期望. 则E = p * T1 + (T2 + E) * (1 - p) 化简后得, p * E = p * T1 +…
A - A Dangerous Maze Time Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu Description 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…
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 the same positio…
A Dangerous Maze (II) LightOJ - 1395(概率dp) 这题是Light Oj 1027的加强版,1027那道是无记忆的. 题意: 有n扇门,每次你可以选择其中一扇.xi为负值的门带你abs(xi)后又回到原点.xi为正值 的门则带你离开迷宫,并且你会记住你前面选择的K道门,在下次选择的时候不会选择这些门.选择每扇门的概率相等.求走出迷宫的时间期望值. 题解: \(定义E[i] 表示记住了K道门后,显然这K道门都是为负值的门,走出迷宫的时间期望值,sum1表示为正的…
题目链接:https://vjudge.net/problem/LightOJ-1395 1395 - A Dangerous Maze (II)    PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like.…
题目链接:https://vjudge.net/problem/LightOJ-1027 1027 - A Dangerous Maze    PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The p…
1027 - A Dangerous Maze PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB 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…
http://www.lightoj.com/volume_showproblem.php?problem=1027 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 ca…
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 the same position where you begun…
链接: https://vjudge.net/problem/LightOJ-1027#author=634579757 题意: 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,…