随笔分类 -  概率+期望问题

CERC2017 Gambling Guide,最短路变形,期望dp
摘要:分析 阅读全文

posted @ 2019-04-17 21:18 cltt 阅读(139) 评论(0) 推荐(0) 编辑

SGU 495
摘要:1 #include 2 using namespace std; 3 #define ll long long 4 const ll inf = 1000000000000; 5 const int N =100010; 6 int n,m; 7 double dp[N]; 8 /* 9 有N个礼物,M次选择,每次取的可能是未被选到的礼物 10 (礼物取走把空盒子放回可... 阅读全文

posted @ 2019-04-11 22:32 cltt 阅读(110) 评论(0) 推荐(0) 编辑

UVA - 12230
摘要:1 #include 2 using namespace std; 3 int n; 4 double d; 5 double p,l,v,ret,sum; 6 int cnt =1; 7 /* 8 9 村庄A,B之间有若干条河流,每条河流上的船速各自保持不变。告诉河流条数,两个村庄之间的距离 10 以及每条河流的距离A村庄的位置,宽度,船的速度。求A... 阅读全文

posted @ 2019-04-09 15:43 cltt 阅读(87) 评论(0) 推荐(0) 编辑

spoj1026 favorite dice
摘要:1 #include 2 using namespace std; 3 int n,t; 4 const int N = 1200; 5 double dp[N]; 6 /* 7 甩一个n面的骰子,问每一面都被甩到的需要甩的次数期望是多少。 8 dp[i]:已经甩到i个面了,要达到n个面还需要次数的期望 9 显然dp[n] = 0 10 那么逆序分析:dp[i] :再甩一... 阅读全文

posted @ 2019-04-09 15:31 cltt 阅读(90) 评论(0) 推荐(0) 编辑

hdu 5984
摘要:PockyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2095 Accepted Submission(s): 1133 Problem De 阅读全文

posted @ 2018-10-07 17:29 cltt 阅读(183) 评论(0) 推荐(0) 编辑

ACM-ICPC 2017 Asia Urumqi A. Coins
摘要:Alice and Bob are playing a simple game. They line up a row of n identical coins, all with the heads facing down onto the table and the tails upward. 阅读全文

posted @ 2018-07-31 18:45 cltt 阅读(293) 评论(0) 推荐(0) 编辑

The 2018 ACM-ICPC Chinese Collegiate Programming Contest Take Your Seat
摘要:/* 证明过程如下 :第一种情况:按1到n的顺序上飞机,1会随意选一个,剩下的上去时若与自己序号相同的座位空就坐下去,若被占了就也会随意选一个。求最后一个人坐在应坐位置的概率 */ 阅读全文

posted @ 2018-07-18 11:18 cltt 阅读(185) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示