摘要: 题:https://www.luogu.com.cn/problem/P4213 学习粗:https://blog.csdn.net/weixin_43914593/article/details/104229700 #include <bits/stdc++.h> using namespace 阅读全文
posted @ 2020-06-01 22:31 starve_to_death 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 题:https://codeforces.com/contest/1359/problem/D 题意:给定一个序列,你可以选择一个区间[L,R],你需要remove掉其中最大的,再sum{L,R},问最大可能是多少。 分析:也就是说,我们可以枚举每个数ai作为最大值,然后再ai左边找前缀和最小的,在 阅读全文
posted @ 2020-06-01 15:46 starve_to_death 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 题:https://codeforces.com/contest/1363/problem/E 题意:给定一棵树,每个节点有ai,bi,ci的属性,代表节点 i 想将自己的bi 通过和自己子树的 值交换而变成ci。类似地,这种交换的代价为2*ai。允许的操作为选择一个节点x,可以选择任意k个该子树节 阅读全文
posted @ 2020-06-01 14:22 starve_to_death 阅读(213) 评论(0) 推荐(0) 编辑