摘要: 题目传送门 codeforces 洛谷 题目大意 给你一个由 \(n\) 个正整数组成的数组 \(a\) 。在一次操作中,选取 \((i, j)\) ,将 \(|a_i - a_j|\) 加到 \(a\) 的末尾。你的任务是在执行 \(k\) 操作后,最小化最后数组 \(a\) 的最小值。 思路 分 阅读全文
posted @ 2024-01-30 18:00 Zinc_Acetate 阅读(59) 评论(0) 推荐(0)
摘要: 题目传送门 codeforces 洛谷 题面 For an array of integers $[a_1, a_2, \dots, a_n]$, let's call the value $|a_1-a_2|+|a_2-a_3|+\cdots+|a_{n-1}-a_n|$ the contrast 阅读全文
posted @ 2024-01-26 00:30 Zinc_Acetate 阅读(33) 评论(0) 推荐(0)
摘要: 题目传送门 codeforces 洛谷 题面 Alice and Bob are playing a game. They have an array $a_1, a_2,\ldots,a_n$. The game consists of two steps: First, Alice will r 阅读全文
posted @ 2024-01-25 18:49 Zinc_Acetate 阅读(87) 评论(0) 推荐(0)
摘要: 题目传送门 codeforces 洛谷 题面 There are $n$ cities located on the number line, the $i$\-th city is in the point $a_i$. The coordinates of the cities are give 阅读全文
posted @ 2024-01-24 00:56 Zinc_Acetate 阅读(74) 评论(0) 推荐(0)
摘要: 寄,会写题不会讲 题目传送门 codeforces 洛谷 题面 In this problem, you are initially given an empty multiset. You have to process two types of queries: ADD \(x\) — add 阅读全文
posted @ 2024-01-23 14:55 Zinc_Acetate 阅读(63) 评论(0) 推荐(0)
摘要: 题目链接 codeforces 洛谷 题面 Winter holidays are coming up. They are going to last for $n$ days. During the holidays, Monocarp wants to try all of these acti 阅读全文
posted @ 2024-01-22 21:18 Zinc_Acetate 阅读(45) 评论(0) 推荐(0)