摘要:        
A在[S1,S2]到达,B在[T1,T2]到达,到达后都会等W分钟,问相遇的概率。 概率论课本上的题目了,列出三个方程s1<=S<=s2,t1<=T<=t2,|T-S|<=w。然后可以转化为几何图形求面积,需要讨论求解。 1 #include <string.h> 2 #include <stdio.h> 3 int cas, t1, t2, s1, s2, w; 4 double area(int w){ 5 int lc = t1+w, rc = t2+w, uc = s2-w, dc = s1-w; 6 if (lc >= s2    阅读全文
        
            posted @ 2012-10-29 18:09
Burn_E
阅读(351)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
一开始有K只兔子(不知道原题中是什么生物=。=),每只兔子能活一天并有pi的概率生出i只新兔子,求m天后所有兔子死光的概率。 概率递推,设D[m]为m天后兔子全死光的概率,则D[m] = D[m-1]^0*p0+D[m-1]^1*p[1]+...D[m-1]^i*pi.. 1 #include <string.h> 2 #include <math.h> 3 #include <stdio.h> 4 int cas, n, m, k; 5 double p[1005], d[1005]; 6 double dp(int x){ 7 if (x == 0) r    阅读全文
        
            posted @ 2012-10-29 17:19
Burn_E
阅读(280)
评论(0)
推荐(0)
        
        
 
                    
                     
                    
                 
                    
                 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号