- 博客(3)
- 资源 (2)
- 问答 (1)
- 收藏
- 关注
原创 Hdu 2222(AC 自动机)
AC自动机就是在字典树上的KMP, 讲解的话百度就好了,讲的都挺详细的 2222就是一个裸地AC自动机 #include #include #include #include #include using namespace std; struct Tree{ int next[500010][26], _end[500010], fail[500
2015-07-23 19:17:42 296
原创 Happy Great BG
The summer training of ZJU ICPC in July is about to end. To celebrate this great and happy day, the coaches of ZJU ICPC TeamNavi and Fancy decided to BG everyone! Beside the two coaches, there are N p
2015-07-20 15:54:12 261
原创 SPOJ MIXTURES
这道题是“石子合并”的变形。同样是用动态规划来解。 用 dp[i, j] 表示从第 i 堆开始的 j 堆混合物合并所释放的最少烟雾量 sum[i, j] 表示从第 i 堆开始的 j 堆混合物合并后的颜色。 然后就有 dp[i][j] = min(dp[i][k] + dp[i+k][j - k] + sum[i][k]*sum[i+k][j-k]); k from 1 to j
2015-07-18 19:36:07 299
iOS app 模拟器图片显示不全
2016-01-06
TA创建的收藏夹 TA关注的收藏夹
TA关注的人