Codeforces Round #881 (Div. 3)

· · 个人记录

Problem A. Sasha and Array Coloring

递增排序,贪心,答案为

\sum_{i = 1}^{n/2} a_{n-i+1}-a_i

Problem B. Long Long