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>假设有一个很长的花坛,一部分地块种植了花,另一部分却没有。可是,花不能种植在相邻的地块上,它们会争夺水源,两者都会死去。</p>\n\n<p>给你一个整数数组  <code>flowerbed</code> 表示花坛,由若干 <code>0</code> 和 <code>1</code> 组成,其中 <code>0</code> 表示没种植花,<code>1</code> 表示种植了花。另有一个数 <code>n</code><strong> </strong>,能否在不打破种植规则的情况下种入 <code>n</code><strong> </strong>朵花?能则返回 <code>true</code> ,不能则返回 <code>false</code>。</p>\n\n<p> </p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>flowerbed = [1,0,0,0,1], n = 1\n<strong>输出:</strong>true\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>flowerbed = [1,0,0,0,1], n = 2\n<strong>输出:</strong>false\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= flowerbed.length <= 2 * 10<sup>4</sup></code></li>\n\t<li><code>flowerbed[i]</code> 为 <code>0</code> 或 <code>1</code></li>\n\t<li><code>flowerbed</code> 中不存在相邻的两朵花</li>\n\t<li><code>0 <= n <= flowerbed.length</code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 441,
"likes": 448,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Teemo Attacking\", \"titleSlug\": \"teemo-attacking\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u63d0\\u83ab\\u653b\\u51fb\"}, {\"title\": \"Asteroid Collision\", \"titleSlug\": \"asteroid-collision\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u884c\\u661f\\u78b0\\u649e\"}]",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"127.3K\", \"totalSubmission\": \"385.5K\", \"totalAcceptedRaw\": 127302, \"totalSubmissionRaw\": 385462, \"acRate\": \"33.0%\"}",
"stats": "{\"totalAccepted\": \"130.6K\", \"totalSubmission\": \"396K\", \"totalAcceptedRaw\": 130578, \"totalSubmissionRaw\": 396044, \"acRate\": \"33.0%\"}",
"hints": [],
"solution": null,
"status": null,