1526
CodeForces 1526F Median Queries
洛谷传送门 CF 传送门 首先,如果我们确定了 \(1, 2\) 或 \(n - 1, n\) 的位置,我们就能求出原排列。因为题目给了 \(p_1 < p_2\),所以可以不考虑对称性。也就是说我们知道两个位置是 \(1, 2\) 或 \(n - 1, n\) 但不确定究竟是 \(1, 2\) 还 ......
[题解] CF1526C2 Potions
# CF1526C2 Potions 题目知识点:反悔贪心。 [题目传送门](https://codeforces.com/contest/1526/problem/C2) ## 题意 给定 $n$ 瓶药水,喝下药水 $i$ 可以给生命增加 $a_i$ ,现在要求你按照从 $1$ 到 $n$ 的顺序 ......