摘要: Description Oleg's favorite subjects are History and Math, and his favorite branch of mathematics is division. To improve his division skills, Oleg ca 阅读全文
posted @ 2020-11-02 22:16 Sport_River 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Divide and Sum 题目大意 给定一个长度为$2n$的数组,将数组分成两个长度为n的数组p,q,将p从小到大排序,将q从大到小排序,对于每种分法,\(ans=\displaystyle\sum_{i=1}^{n}|p_i-q_i|\),现在求总的答案 Solution 考虑将a先从小到大排 阅读全文
posted @ 2020-11-02 22:15 Sport_River 阅读(117) 评论(0) 推荐(0) 编辑