摘要: 题意 "题目链接" Sol 动态dp板子题。有些细节还没搞懂,待我研究明白后再补题解。。。 cpp include define LL long long using namespace std; const int MAXN = 1e5 + 10, INF = INT_MAX; template 阅读全文
posted @ 2019-02-24 11:31 自为风月马前卒 阅读(500) 评论(0) 推荐(1) 编辑
摘要: 题意 "题目链接" Sol 这题可以动态dp做。 设$f[i]$表示以$i$为结尾的最大子段和,$g[i]$表示$1 i$的最大子段和 那么 $f[i] = max(f[i 1] + a[i], a[i])$ $g[i] = max(g[i 1], f[i])$ 发现只跟前一项有关,而且$g[i]从 阅读全文
posted @ 2019-02-24 08:54 自为风月马前卒 阅读(403) 评论(0) 推荐(0) 编辑

Contact with me