摘要: 简要题意:给出一个 \(n\) 个点的树,对某个点 \(i\) 求包含某一个点的大小为 \(k\) 的权值最大的连通块,一个连通块的权值是其所有点的权值之和。 \(n\le 40000,k\le \min(3000,n)\) 这个树上背包很难直接解决,考虑一种变体的树形背包:点分治。 点分治后,设分 阅读全文
posted @ 2023-10-09 11:52 灰鲭鲨 阅读(328) 评论(0) 推荐(1)
摘要: 题目描述 The Arca Carania Mountain national park is opening up for tourist traffic. The national park has a number of sites worth seeing and roads that co 阅读全文
posted @ 2023-10-09 11:36 灰鲭鲨 阅读(29) 评论(0) 推荐(0)
摘要: 题目描述 Note that the memory limit in this problem is less than usual. Let's consider an array consisting of positive integers, some positions of which c 阅读全文
posted @ 2023-10-09 11:27 灰鲭鲨 阅读(10) 评论(0) 推荐(0)
摘要: [IOI2000] 邮局 题目描述 高速公路旁边有一些村庄。高速公路表示为整数轴,每个村庄的位置用单个整数坐标标识。没有两个在同样地方的村庄。两个位置之间的距离是其整数坐标差的绝对值。 邮局将建在一些,但不一定是所有的村庄中。为了建立邮局,应选择他们建造的位置,使每个村庄与其最近的邮局之间的距离总和 阅读全文
posted @ 2023-10-09 10:52 灰鲭鲨 阅读(70) 评论(0) 推荐(0)