2023/09/16/acm/codeforces/CodeforcesRound897/ #8
Replies: 1 comment 3 replies
-
|
好耶 是新评论区 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
2023/09/16/acm/codeforces/CodeforcesRound897/
A. green_gold_dog, array and permutation大致题意已知一个数组$a$ ,长度为 $n$ ,需要给出一个 $n$ 的排列 $b$ ,使得得到的新数组 $c_i = a_i - b_i$ 中不同的值尽可能多,问数组 $b$ 的结果可能是 思路简单来说就是要差值差异大,而且没有取 $abs$ ,所以可以直接排序一下,一个递增一个递减配对即可 AC code12345678
https://blog.mauve.icu/2023/09/16/acm/codeforces/CodeforcesRound897/
Beta Was this translation helpful? Give feedback.
All reactions