mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 21:46:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>8 间牢房排成一排,每间牢房不是有人住就是空着。</p>\n\n<p>每天,无论牢房是被占用或空置,都会根据以下规则进行更改:</p>\n\n<ul>\n\t<li>如果一间牢房的两个相邻的房间都被占用或都是空的,那么该牢房就会被占用。</li>\n\t<li>否则,它就会被空置。</li>\n</ul>\n\n<p>(请注意,由于监狱中的牢房排成一行,所以行中的第一个和最后一个房间无法有两个相邻的房间。)</p>\n\n<p>我们用以下方式描述监狱的当前状态:如果第 <code>i</code> 间牢房被占用,则 <code>cell[i]==1</code>,否则 <code>cell[i]==0</code>。</p>\n\n<p>根据监狱的初始状态,在 <code>N</code> 天后返回监狱的状况(和上述 N 种变化)。</p>\n\n<p> </p>\n\n<ol>\n</ol>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>cells = [0,1,0,1,1,0,0,1], N = 7\n<strong>输出:</strong>[0,0,1,1,0,0,0,0]\n<strong>解释:\n</strong>下表概述了监狱每天的状况:\nDay 0: [0, 1, 0, 1, 1, 0, 0, 1]\nDay 1: [0, 1, 1, 0, 0, 0, 0, 0]\nDay 2: [0, 0, 0, 0, 1, 1, 1, 0]\nDay 3: [0, 1, 1, 0, 0, 1, 0, 0]\nDay 4: [0, 0, 0, 0, 0, 1, 0, 0]\nDay 5: [0, 1, 1, 1, 0, 1, 0, 0]\nDay 6: [0, 0, 1, 0, 1, 1, 0, 0]\nDay 7: [0, 0, 1, 1, 0, 0, 0, 0]\n\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>cells = [1,0,0,1,0,0,1,0], N = 1000000000\n<strong>输出:</strong>[0,0,1,1,1,1,1,0]\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ol>\n\t<li><code>cells.length == 8</code></li>\n\t<li><code>cells[i]</code> 的值为 <code>0</code> 或 <code>1</code> </li>\n\t<li><code>1 <= N <= 10^9</code></li>\n</ol>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 115,
|
||||
"likes": 117,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"15.6K\", \"totalSubmission\": \"43.1K\", \"totalAcceptedRaw\": 15612, \"totalSubmissionRaw\": 43104, \"acRate\": \"36.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"16K\", \"totalSubmission\": \"44K\", \"totalAcceptedRaw\": 15989, \"totalSubmissionRaw\": 44033, \"acRate\": \"36.3%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
||||
Reference in New Issue
Block a user