2016年2月11日

【HDOJ】4333 Revolving Digits

摘要: 扩展KMP基础题目。 1 /* 4333 */ 2 #include <iostream> 3 #include <sstream> 4 #include <string> 5 #include <map> 6 #include <queue> 7 #include <set> 8 #include 阅读全文

posted @ 2016-02-11 23:19 Bombe 阅读(194) 评论(0) 推荐(0) 编辑

【HDOJ】4336 Card Collector

摘要: 概率DP的题目,一直就不会做这类题目。dp[s]表示状态为s的时候再买多少张牌可以买全,表示的是一个期望值。dp[s] = 1 + P(empty) * dp[s] + P(had) * dp[s] + P(new) * dp[nst]。从而可以解dp[s]。 1 /* 4336 */ 2 #inc 阅读全文

posted @ 2016-02-11 21:26 Bombe 阅读(174) 评论(0) 推荐(0) 编辑

导航