mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-12-18 18:14:59 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "「力扣挑战赛」中 `N*M` 大小的自行车炫技赛场的场地由一片连绵起伏的上下坡组成,场地的高度值记录于二维数组 `terrain` 中,场地的减速值记录于二维数组 `obstacle` 中。\n- 若选手骑着自行车从高度为 `h1` 且减速值为 `o1` 的位置到高度为 `h2` 且减速值为 `o2` 的相邻位置(上下左右四个方向),速度变化值为 `h1-h2-o2`(负值减速,正值增速)。\n\n选手初始位于坐标 `position` 处且初始速度为 1,请问选手可以刚好到其他哪些位置时速度依旧为 1。请以二维数组形式返回这些位置。若有多个位置则按行坐标升序排列,若有多个位置行坐标相同则按列坐标升序排列。\n\n**注意:** 骑行过程中速度不能为零或负值\n\n**示例 1:**\n> 输入\b:`position = [0,0], terrain = [[0,0],[0,0]], obstacle = [[0,0],[0,0]]`\n> \n> 输出:`[[0,1],[1,0],[1,1]]`\n> \n> 解释:\n> 由于当前场地属于平地,根据上面的规则,选手从`[0,0]`的位置出发都能刚好在其他处的位置速度为 1。\n\n**示例 2:**\n> 输入\b:`position = [1,1], terrain = [[5,0],[0,6]], obstacle = [[0,6],[7,0]]`\n> \n> 输出:`[[0,1]]`\n> \n> 解释:\n> 选手从 `[1,1]` 处的位置出发,到 `[0,1]` 处的位置时恰好速度为 1。\n\n\n**提示:**\n- `n == terrain.length == obstacle.length`\n- `m == terrain[i].length == obstacle[i].length`\n- `1 <= n <= 100`\n- `1 <= m <= 100`\n- `0 <= terrain[i][j], obstacle[i][j] <= 100`\n- `position.length == 2`\n- `0 <= position[0] < n`\n- `0 <= position[1] < m`",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 6,
|
||||
"likes": 7,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -162,7 +162,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"1.5K\", \"totalSubmission\": \"6.6K\", \"totalAcceptedRaw\": 1472, \"totalSubmissionRaw\": 6567, \"acRate\": \"22.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"1.6K\", \"totalSubmission\": \"6.8K\", \"totalAcceptedRaw\": 1578, \"totalSubmissionRaw\": 6784, \"acRate\": \"23.3%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
||||
Reference in New Issue
Block a user