atcoder DP做题笔记
摘要:
[ABC163E] Active Infants 题意:给定长度为 \(n(n \le 2 \times 10^3)\) 的序列 \(a\) ,重排使得 \(a_x \times |x-p_x|\) 之和最大。 独立完成。 从大到小地考虑 \(a_i\) ,贪心地使得 \(|x-p_x|\) 最大。 阅读全文
posted @ 2024-11-09 16:20
liyelin
阅读(13)
评论(0)
推荐(0)