Loading [MathJax]/extensions/tex2jax.js

标签: 贪心,模拟

1 篇文章

数组操作
Origional Link 思想: 贪心,模拟。 首先对数组进行从小到大排序,再找到第一个 a[idx] != 0 的位置。 对于每次询问,以 base 记录当前数组已经减去的总值,判断时应当计算当前元素与 base 的差值。 若 a[idx] - base > 0 说明需要将后续所有元素减…

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/wp-content/themes/argon-theme-featured/inc/fun/paginate.php on line 22

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/wp-content/themes/argon-theme-featured/inc/fun/paginate.php on line 22