摘要: #include <bits/stdc++.h> #define DBG(x) cerr << #x << " = " << x << endl typedef long long LL; using namespace std; const int N = 512; LL ans[N][128], 阅读全文
posted @ 2017-08-30 15:47 ToRapture 阅读(119) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> #define DBG(x) cerr << #x << " = " << x << endl typedef long long LL; using namespace std; const int MAX_SUM = 250000 + 16; c 阅读全文
posted @ 2017-08-30 15:46 ToRapture 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 令$sum(l, r) = \sum\limits_{i \in [l, r]} a_i$,求$\max{\min_ra_i \times sum(l, r) \ |\ 1 \le l \le r \le n }$。 对于每一个$a_i$,用单调栈维护出一个长度最大的区间$[L_i, R_i]\(, 阅读全文
posted @ 2017-08-30 15:13 ToRapture 阅读(167) 评论(0) 推荐(0) 编辑