1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-13 01:15:14 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2025-09-29 14:43:44 +08:00
parent 2862a227c4
commit 13f2098086
4409 changed files with 168933 additions and 166256 deletions

View File

@@ -6,12 +6,14 @@
<li>Subtract <code>2<sup>k</sup></code> from <code>nums[i]</code> and <code>nums[j]</code>.</li>
</ul>
<p>A subarray is <strong>beautiful</strong> if it is possible to make all of its elements equal to <code>0</code> after applying the above operation any number of times.</p>
<p>A subarray is <strong>beautiful</strong> if it is possible to make all of its elements equal to <code>0</code> after applying the above operation any number of times (including zero).</p>
<p>Return <em>the number of <strong>beautiful subarrays</strong> in the array</em> <code>nums</code>.</p>
<p>A subarray is a contiguous <strong>non-empty</strong> sequence of elements within an array.</p>
<p><strong>Note</strong>: Subarrays where all elements are initially 0 are considered beautiful, as no operation is needed.</p>
<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>