1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-22 05:26:46 +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

@@ -12,12 +12,12 @@
"translatedContent": "表:<code>Stadium</code>\n<pre>\n+---------------+---------+\n| Column Name | Type |\n+---------------+---------+\n| id | int |\n| visit_date | date |\n| people | int |\n+---------------+---------+\nvisit_date 是该表中具有唯一值的列。\n每日人流量信息被记录在这三列信息中<strong>序号</strong> (id)、<strong>日期</strong> (visit_date)、&nbsp;<strong>人流量</strong> (people)\n每天只有一行记录日期随着 id 的增加而增加\n</pre>\n\n<p>&nbsp;</p>\n\n<p>编写解决方案找出每行的人数大于或等于 <code>100</code> 且 <code>id</code> 连续的三行或更多行记录。</p>\n\n<p>返回按 <code>visit_date</code> <strong>升序排列</strong> 的结果表。</p>\n\n<p>查询结果格式如下所示。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<code><strong>输入:</strong>\nStadium</code> 表:\n+------+------------+-----------+\n| id | visit_date | people |\n+------+------------+-----------+\n| 1 | 2017-01-01 | 10 |\n| 2 | 2017-01-02 | 109 |\n| 3 | 2017-01-03 | 150 |\n| 4 | 2017-01-04 | 99 |\n| 5 | 2017-01-05 | 145 |\n| 6 | 2017-01-06 | 1455 |\n| 7 | 2017-01-07 | 199 |\n| 8 | 2017-01-09 | 188 |\n+------+------------+-----------+\n<strong>输出:</strong>\n+------+------------+-----------+\n| id | visit_date | people |\n+------+------------+-----------+\n| 5 | 2017-01-05 | 145 |\n| 6 | 2017-01-06 | 1455 |\n| 7 | 2017-01-07 | 199 |\n| 8 | 2017-01-09 | 188 |\n+------+------------+-----------+\n<strong>解释:\nid</strong> 为 5、6、7、8 的四行 id 连续,并且每行都有 &gt;= 100 的人数记录。\n请注意即使第 7 行和第 8 行的 visit_date 不是连续的,输出也应当包含第 8 行,因为我们只需要考虑 id 连续的记录。\n不输出 id 为 2 和 3 的行,因为至少需要三条 id 连续的记录。</pre>\n",
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 363,
"likes": 380,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python\": false, \"python3\": false, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false, \"cangjie\": false}",
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python3\": false, \"python\": false, \"javascript\": false, \"typescript\": false, \"csharp\": false, \"c\": false, \"golang\": false, \"kotlin\": false, \"swift\": false, \"rust\": false, \"ruby\": false, \"php\": false, \"dart\": false, \"scala\": false, \"elixir\": false, \"erlang\": false, \"racket\": false, \"cangjie\": false, \"bash\": false, \"html\": false, \"pythonml\": false, \"react\": false, \"vanillajs\": false, \"mysql\": false, \"mssql\": false, \"postgresql\": false, \"oraclesql\": false, \"pythondata\": false}",
"topicTags": [
{
"name": "Database",
@@ -40,6 +40,12 @@
"code": "/* Write your T-SQL query statement below */",
"__typename": "CodeSnippetNode"
},
{
"lang": "PostgreSQL",
"langSlug": "postgresql",
"code": "-- Write your PostgreSQL query statement below",
"__typename": "CodeSnippetNode"
},
{
"lang": "Oracle",
"langSlug": "oraclesql",
@@ -51,15 +57,9 @@
"langSlug": "pythondata",
"code": "import pandas as pd\n\ndef human_traffic(stadium: pd.DataFrame) -> pd.DataFrame:\n ",
"__typename": "CodeSnippetNode"
},
{
"lang": "PostgreSQL",
"langSlug": "postgresql",
"code": "-- Write your PostgreSQL query statement below",
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"64K\", \"totalSubmission\": \"130.9K\", \"totalAcceptedRaw\": 64024, \"totalSubmissionRaw\": 130941, \"acRate\": \"48.9%\"}",
"stats": "{\"totalAccepted\": \"71.1K\", \"totalSubmission\": \"143.6K\", \"totalAcceptedRaw\": 71133, \"totalSubmissionRaw\": 143639, \"acRate\": \"49.5%\"}",
"hints": [],
"solution": null,
"status": null,