摘要: 题解:广义斐波那契数列 矩阵乘法 #include<iostream> #include<cstdio> #include<cstring> #define LL long long using namespace std; LL n,A,B; inline LL read(){ char ch=g 阅读全文
posted @ 2017-11-07 21:52 ANhour 阅读(273) 评论(0) 推荐(0)
摘要: 传送门 题目大意: 攻击k次,每次可攻击随从或英雄。 随从数不大于7个,且1滴血的a个,2滴b个,3滴c个。 攻击一次血-1,如果随从没死可以生成3滴血随从一个 题解: 概率/期望dp f[i][j][p][q]表示攻击i次,一滴血的有j个,二滴血的有p个,三滴血的有q个。 转移就是枚举打在谁身上 阅读全文
posted @ 2017-11-07 20:03 ANhour 阅读(205) 评论(0) 推荐(0)
摘要: 图论 数据结构 数学 其他: 洛谷模板:a,b两个字符串,求b串在a串中出现的位置 #include<iostream> #include<cstdio> #include<cstring> using namespace std; char s1[1000009],s2[1001]; int le 阅读全文
posted @ 2017-11-07 19:01 ANhour 阅读(1230) 评论(0) 推荐(0)
摘要: 一、生成树 洛谷模板最小生成树【跑的还算快的 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define N 5020 #define M 200008 using namespace std; 阅读全文
posted @ 2017-11-07 18:08 ANhour 阅读(545) 评论(0) 推荐(0)