mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 06:51:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -5,22 +5,22 @@
|
||||
<p>Return <em>the <strong>total area</strong></em>. Since the answer may be too large, return it <strong>modulo</strong> <code>10<sup>9</sup> + 7</code>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
<img alt="" src="https://s3-lc-upload.s3.amazonaws.com/uploads/2018/06/06/rectangle_area_ii_pic.png" style="width: 600px; height: 450px;" />
|
||||
<pre>
|
||||
<strong>Input:</strong> rectangles = [[0,0,2,2],[1,0,2,3],[1,0,3,1]]
|
||||
<strong>Output:</strong> 6
|
||||
<strong>Explanation: </strong>A total area of 6 is covered by all three rectangales, as illustrated in the picture.
|
||||
<strong>Explanation:</strong> A total area of 6 is covered by all three rectangles, as illustrated in the picture.
|
||||
From (1,1) to (2,2), the green and red rectangles overlap.
|
||||
From (1,0) to (2,3), all three rectangles overlap.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> rectangles = [[0,0,1000000000,1000000000]]
|
||||
<strong>Output:</strong> 49
|
||||
<strong>Explanation: </strong>The answer is 10<sup>18</sup> modulo (10<sup>9</sup> + 7), which is 49.
|
||||
<strong>Explanation:</strong> The answer is 10<sup>18</sup> modulo (10<sup>9</sup> + 7), which is 49.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
@@ -30,4 +30,6 @@ From (1,0) to (2,3), all three rectangles overlap.
|
||||
<li><code>1 <= rectangles.length <= 200</code></li>
|
||||
<li><code>rectanges[i].length == 4</code></li>
|
||||
<li><code>0 <= x<sub>i1</sub>, y<sub>i1</sub>, x<sub>i2</sub>, y<sub>i2</sub> <= 10<sup>9</sup></code></li>
|
||||
<li><code>x<sub>i1 <= </sub>x<sub>i2</sub></code></li>
|
||||
<li><code>y<sub>i1 <=</sub> y<sub>i2</sub></code></li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user