
ACM
文章平均质量分 89
ACMICPC
剑气扬名
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ACM训练赛第19场补题
ACM训练赛第19场补题问题 A: At Least Average时间限制: 1 Sec 内存限制: 128 MB题目描述Blake plays a video game that has n levels. On each level, she can earn in between 0 and 10 points, inclusive. The number of points she gets on a level must be an integer. She has set up a原创 2021-04-22 20:30:15 · 284 阅读 · 0 评论 -
ACM训练赛第17场
ACM训练赛第17场问题 A: Bing Bong to Bong Bong时间限制: 2 Sec 内存限制: 128 MB题目描述Bing Bong, the pink imaginary friend from Riley’s childhood, is lonely.He wants to preserve his memory, but he wants to try to hide his name in the stories. He wants you to help him do原创 2021-04-14 16:32:47 · 472 阅读 · 0 评论 -
ACM训练赛第16场
ACM训练赛第16场问题 F: Exam Manipulation时间限制: 1 Sec 内存限制: 128 MB题目描述A group of students is taking a True/False exam. Each question is worth one point. You, as their teacher, want to make your students look as good as possible—so you cheat! (I know, you would原创 2021-04-12 17:36:58 · 583 阅读 · 0 评论 -
区间dp模板 石子合并
石子合并设有N堆石子排成一排,其编号为1,2,3,…,N。每堆石子有一定的质量,可以用一个整数来描述,现在要将这N堆石子合并成为一堆。每次只能合并相邻的两堆,合并的代价为这两堆石子的质量之和,合并后与这两堆石子相邻的石子将和新堆相邻,合并时由于选择的顺序不同,合并的总代价也不相同。例如有4堆石子分别为 1 3 5 2, 我们可以先合并1、2堆,代价为4,得到4 5 2, 又合并 1,2堆,代价为9,得到9 2 ,再合并得到11,总代价为4+9+11=24;如果第二步是先合并2,3堆,则代价为7,得原创 2020-11-01 15:22:26 · 430 阅读 · 0 评论 -
01背包优先队列优化
01背包优先队列优化设重量为w,权值为v则单位重量价值为v / w设有物品1,物品2若v1 / w1 < v2 / w2则说明v2的单位重量价值高即v1 * w2 < v2 * w1于是可重载结构体,使得v2 * w1大的优先级高即:struct Node { LL w, v; Node() {}; Node(LL _w, LL _v) {w = _w, v = _v;} friend bool operator < (Node a, Node b) {原创 2020-10-31 19:17:11 · 594 阅读 · 0 评论