mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-02 14:12:17 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个二维整数数组 <code>logs</code> ,其中每个 <code>logs[i] = [birth<sub>i</sub>, death<sub>i</sub>]</code> 表示第 <code>i</code> 个人的出生和死亡年份。</p>\n\n<p>年份 <code>x</code> 的 <strong>人口</strong> 定义为这一年期间活着的人的数目。第 <code>i</code> 个人被计入年份 <code>x</code> 的人口需要满足:<code>x</code> 在闭区间 <code>[birth<sub>i</sub>, death<sub>i</sub> - 1]</code> 内。注意,人不应当计入他们死亡当年的人口中。</p>\n\n<p>返回 <strong>人口最多</strong> 且 <strong>最早</strong> 的年份。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>logs = [[1993,1999],[2000,2010]]\n<strong>输出:</strong>1993\n<strong>解释:</strong>人口最多为 1 ,而 1993 是人口为 1 的最早年份。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>logs = [[1950,1961],[1960,1971],[1970,1981]]\n<strong>输出:</strong>1960\n<strong>解释:</strong> \n人口最多为 2 ,分别出现在 1960 和 1970 。\n其中最早年份是 1960 。</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= logs.length <= 100</code></li>\n\t<li><code>1950 <= birth<sub>i</sub> < death<sub>i</sub> <= 2050</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 38,
|
||||
"likes": 41,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"13.6K\", \"totalSubmission\": \"17.8K\", \"totalAcceptedRaw\": 13599, \"totalSubmissionRaw\": 17822, \"acRate\": \"76.3%\"}",
|
||||
"stats": "{\"totalAccepted\": \"13.9K\", \"totalSubmission\": \"18.3K\", \"totalAcceptedRaw\": 13891, \"totalSubmissionRaw\": 18275, \"acRate\": \"76.0%\"}",
|
||||
"hints": [
|
||||
"For each year find the number of people whose birth_i ≤ year and death_i > year.",
|
||||
"Find the maximum value between all years."
|
||||
|
Reference in New Issue
Block a user