![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学
文章平均质量分 57
Claret_
这个作者很懒,什么都没留下…
展开
-
LightOJ1265 - Island of Survival
DescriptionYou 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原创 2015-07-21 00:12:15 · 449 阅读 · 0 评论 -
LightOJ1248-Dice (III)
题意:给一个n个面的骰子,每个面点数出现的概率相同,求扔出所有面的期望次数。思路:设dp[i]为已经扔出了i个不同面值,还要扔dp[i]次才能扔出n个不同面的期望次数,显然dp[n] = 0,要求dp[0] 则dp[i[ = 1+ i/n * dp[i] + (n-i)/n * dp[i+1],本来要扔的一次加上各个状态转移的期望值=>dp[i] = (n原创 2015-07-26 20:14:30 · 349 阅读 · 0 评论 -
LigthOJ1284-Lights inside 3D Grid
题意:在一个长宽高为XYZ的长方体中所有的灯都是关着的,一次操作为任选两个格子,以这两个格子为顶点的长方体所包括的所有格子上的灯状态都会改变,关的会被打开,开的会被关掉,给定XYZ的值,现在进行K次操作,问开着的灯的期望个数思路:求出每个格子经过K次操作后灯是开着的期望值,然后把所有的格子的期望值加起来就是总期望值对于每个格子,把XYZ的值分开考虑,因为XYZ是分别独立的,如果在一次操作中原创 2015-07-26 21:31:47 · 576 阅读 · 0 评论 -
LightOJ1038-Race to 1 Again
#include #include #include #include #include #define M 1100000using namespace std;double dp[100001];double d ( int D ) { if ( dp[D] >= 0 ) return dp[D]; double cnt = 0; double ans = 0; f原创 2015-07-21 00:17:52 · 520 阅读 · 0 评论