![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
----------概率/期望
文章平均质量分 53
mfcheer
他不停地跑啊跑 就为了追上那个曾经被寄予厚望的自己
展开
-
uva 11021 Tribles 【概率】
Description Tribbles Input: Standard Input Output: Standard Output GRAVITATION, n. “The tendency of all bodies to approach one another with a strength proportion to the quantity of matter they co原创 2015-03-26 21:39:32 · 634 阅读 · 0 评论 -
LightOj 1027 A Dangerous Maze【概率】
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1027题意: 你面前有n个门,每个对应一个数字,若为正xi,代表xi分钟后你会从它走出迷宫,负数则说明你会在-xi分钟后回到出发点且失去记忆。求出去的时间的期望。代码:#include <iostream>#include <stdio.h>#include <math.h>原创 2015-06-05 09:50:42 · 859 阅读 · 0 评论 -
poj 2096 Collecting Bugs【概率DP】
题目链接:http://poj.org/problem?id=2096 题意: 一个软件有s个子系统,会产生n种bug。 某人一天发现一个bug,这个bug属于某种bug,发生在某个子系统中。 求找到所有的n种bug,且每个子系统都找到bug,这样所要的天数的期望。 需要注意的是:bug的数量是无穷大的,所以发现一个bug,出现在某个子系统的概率是1/s,原创 2015-06-08 21:44:07 · 574 阅读 · 1 评论 -
hdu 4405 Aeroplane chess【概率DP求期望】
题目链接:http://acm.acmcoder.com/showproblem.php?pid=4405 题意:棋子,从0到n,置骰子,置到几就往前走几步,前进中会有捷径,比如2和5连到一起了,那你走到2时可以直接跳到5,如果5和8连到一起了,那你还可以继续跳到8,最后问跳到n时平均置几次骰子。也就是求期望。 解法:普通概率DP,dp[n] == 0 ;向前递推。 代码:#include <原创 2015-06-09 11:23:52 · 619 阅读 · 0 评论 -
LightOJ 1030 Discovering Gold【概率】
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1030 题意:基础概率题。 代码:#include <stdio.h>#include <string.h>#include <vector> #include <string> #include <algorithm> #include <iostream>原创 2015-06-08 20:26:31 · 790 阅读 · 0 评论 -
hdu 3853 LOOPS 【概率DP】
题目链接:http://acm.acmcoder.com/showproblem.php?pid=3853 题意:求走到终点消耗能量的期望。 解法: dp[i][j] 可以转移到 dp[i][j+1] 和 dp[i][j+1] 和 dp[i][j] 各个转移的概率已经给出,倒退即可。 代码:#include <stdio.h>#include <string.h>#include <原创 2015-06-09 12:43:35 · 637 阅读 · 0 评论 -
ACM中的期望 概率问题
简易的入门:http://kicd.blog.163.com/blog/static/126961911200910168335852/ 大神的总结:http://blog.csdn.net/woshi250hua/article/details/7912049当求出转移方程的时候,如何破环是关键.当每个方程之和一个未知数关联时,迭代两次即可eg:hdu 4089当有一个是多个时,就必须用高斯消元原创 2015-06-09 13:12:43 · 3672 阅读 · 0 评论 -
LightOJ 1104 - Birthday Paradox【概率】
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1104 题意:生日驳论,求最小满足条件的人数 代码:#include <stdio.h>#include <iostream>#include <string.h>#include <algorithm>#include <bitset>#include <math.原创 2015-06-11 11:57:04 · 755 阅读 · 0 评论