
CF
cheng__yu_
这个作者很懒,什么都没留下…
展开
-
D. Yet Another Subarray Problem (DP | | 枚举起点) Educational Codeforces Round 69 (Rated for Div. 2)
链接:https://codeforces.com/contest/1197/problem/D题意:给定一个长度为 n 的数组,选择一段 [l,r][l,r][l,r] ,使得公式 ∑i=lra[i]−k⌈r−l+1m⌉\sum_{i=l}^r a[i] -k\lceil \frac{r-l+1}{m} \rceil∑i=lra[i]−k⌈mr−l+1⌉的值最大思路:方法1:枚举选择的起点 i ,在区间的第一个元素减去 k 。在区间的最后一个元素统计一下最小值。只在 (j -i)%m==m-.原创 2020-05-26 21:52:25 · 261 阅读 · 0 评论 -
Codeforces Round #638 (Div. 2) May/01/2020 22:35UTC+8
Codeforces Round #638A. Phoenix and BalanceB. Phoenix and BeautyC. Phoenix and DistributionD. Phoenix and Science链接 https://codeforces.com/contest/1348A. Phoenix and Balance#include <bits/stdc+...原创 2020-05-02 23:16:51 · 809 阅读 · 0 评论 -
C. Nastya and Strange Generator Codeforces Round #637 (Div. 2) - Thanks, Ivan Belonogov!
链接:https://codeforces.com/contest/1341/problem/C题意:问给定的序列能不能题中所给的算法生成。比如,题目中举的例子:原序列a: [ 2 3 * * 1 ],先得出 r 数组 [ 3, 3 ,3 ,4 , * ] 。r 数组的意思是:原序列当前位置右边第一个空格的位置,比如原序列 a 索引为1的位置的右边第一个空位是 3。索引为2的位置的右边第个空...原创 2020-04-24 12:32:40 · 727 阅读 · 0 评论