1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-04 23:11:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>有一些球形气球贴在一堵用 XY 平面表示的墙面上。墙面上的气球记录在整数数组&nbsp;<code>points</code>&nbsp;,其中<code>points[i] = [x<sub>start</sub>, x<sub>end</sub>]</code>&nbsp;表示水平直径在&nbsp;<code>x<sub>start</sub></code>&nbsp;和&nbsp;<code>x<sub>end</sub></code>之间的气球。你不知道气球的确切 y 坐标。</p>\n\n<p>一支弓箭可以沿着 x 轴从不同点 <strong>完全垂直</strong> 地射出。在坐标 <code>x</code> 处射出一支箭,若有一个气球的直径的开始和结束坐标为 <code>x</code><sub><code>start</code></sub><code>x</code><sub><code>end</code></sub> 且满足 &nbsp;<code>x<sub>start</sub>&nbsp;≤ x ≤ x</code><sub><code>end</code></sub>则该气球会被 <strong>引爆</strong>&nbsp;<sub>。</sub>可以射出的弓箭的数量 <strong>没有限制</strong> 。 弓箭一旦被射出之后,可以无限地前进。</p>\n\n<p>给你一个数组 <code>points</code> <em>返回引爆所有气球所必须射出的 <strong>最小</strong> 弓箭数&nbsp;</em>。</p>\n&nbsp;\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>points = [[10,16],[2,8],[1,6],[7,12]]\n<strong>输出:</strong>2\n<strong>解释:</strong>气球可以用2支箭来爆破:\n-在x = 6处射出箭击破气球[2,8]和[1,6]。\n-在x = 11处发射箭击破气球[10,16]和[7,12]。</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>points = [[1,2],[3,4],[5,6],[7,8]]\n<strong>输出:</strong>4\n<strong>解释:</strong>每个气球需要射出一支箭总共需要4支箭。</pre>\n\n<p><strong>示例 3</strong></p>\n\n<pre>\n<strong>输入:</strong>points = [[1,2],[2,3],[3,4],[4,5]]\n<strong>输出:</strong>2\n解释气球可以用2支箭来爆破:\n- 在x = 2处发射箭击破气球[1,2]和[2,3]。\n- 在x = 4处射出箭击破气球[3,4]和[4,5]。</pre>\n\n<p>&nbsp;</p>\n\n<p><meta charset=\"UTF-8\" /></p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= points.length &lt;= 10<sup>5</sup></code></li>\n\t<li><code>points[i].length == 2</code></li>\n\t<li><code>-2<sup>31</sup>&nbsp;&lt;= x<sub>start</sub>&nbsp;&lt; x<sub>end</sub>&nbsp;&lt;= 2<sup>31</sup>&nbsp;- 1</code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 553,
"likes": 567,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Meeting Rooms II\", \"titleSlug\": \"meeting-rooms-ii\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u4f1a\\u8bae\\u5ba4 II\"}, {\"title\": \"Non-overlapping Intervals\", \"titleSlug\": \"non-overlapping-intervals\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u65e0\\u91cd\\u53e0\\u533a\\u95f4\"}]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"125.6K\", \"totalSubmission\": \"247.7K\", \"totalAcceptedRaw\": 125563, \"totalSubmissionRaw\": 247690, \"acRate\": \"50.7%\"}",
"stats": "{\"totalAccepted\": \"132.2K\", \"totalSubmission\": \"261.1K\", \"totalAcceptedRaw\": 132243, \"totalSubmissionRaw\": 261115, \"acRate\": \"50.6%\"}",
"hints": [],
"solution": null,
"status": null,