![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
区间dp
文章平均质量分 92
bao___zi
ACM 弱鸡一枚
What this era lacks is not the person who is perfect but the person who is with virtue, justice, courage and compassion.
展开
-
区间DP BZOJ 3229石子合并
Description 在一个操场上摆放着一排N堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的2堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。 试设计一个算法,计算出将N堆石子合并成一堆的最小得分.Input 第一行是一个数N。以下N行每行一个数A,表示石子数目。Output 共一个数,即N堆石子合并成一堆的最小得分。Sample In...原创 2018-08-21 19:29:42 · 360 阅读 · 0 评论 -
Codeforces 245H Queries for Number of Palindromes (区间DP)
You've got a string s = s1s2... s|s| of length |s|, consisting of lowercase English letters. There also are q queries, each query is described by two integers li, ri (1 ≤ li ≤ ri ≤ |s|). The answer to...原创 2018-09-12 15:28:34 · 211 阅读 · 0 评论