mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 16:31:42 +08:00
存量题库数据更新
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<p>You are given two <strong>0-indexed</strong> arrays <code>nums1</code> and <code>nums2</code> and a 2D array <code>queries</code> of queries. There are three types of queries:</p>
|
||||
|
||||
<ol>
|
||||
<li>For a query of type 1, <code>queries[i] = [1, l, r]</code>. Flip the values from <code>0</code> to <code>1</code> and from <code>1</code> to <code>0</code> in <code>nums1 </code>from index <code>l</code> to index <code>r</code>. Both <code>l</code> and <code>r</code> are <strong>0-indexed</strong>.</li>
|
||||
<li>For a query of type 1, <code>queries[i] = [1, l, r]</code>. Flip the values from <code>0</code> to <code>1</code> and from <code>1</code> to <code>0</code> in <code>nums1</code> from index <code>l</code> to index <code>r</code>. Both <code>l</code> and <code>r</code> are <strong>0-indexed</strong>.</li>
|
||||
<li>For a query of type 2, <code>queries[i] = [2, p, 0]</code>. For every index <code>0 <= i < n</code>, set <code>nums2[i] = nums2[i] + nums1[i] * p</code>.</li>
|
||||
<li>For a query of type 3, <code>queries[i] = [3, 0, 0]</code>. Find the sum of the elements in <code>nums2</code>.</li>
|
||||
</ol>
|
||||
|
Reference in New Issue
Block a user