D. Array Restoration time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Initially there was an array $$$a$$$ consisting of $$$n$$$ integers. Positions in it are numbered from $$$1$$$ to $$$n$$…
A. Yet Another Two Integers Problem 最优的操作中,\(k = \min(10, abs(a - b))\),记\(d=abs(a-b)\),最终的答案为\(ans = \lfloor \frac{d}{10} \rfloor + [10|d]\). B. Minimum Product 猜结论:最优的情况必定是先把可用次数尽可能地用在其中一个数,然后再将剩余操作尽可能地用在另外一个数上. 分别算出先a后b和先b后a的答案,然后取最小值即可. C. Yet An…