1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-24 14:28:56 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 16:56:27 +08:00
parent e730aa6794
commit ad15da05aa
2517 changed files with 7358 additions and 7332 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>有两个水壶,容量分别为&nbsp;<code>jug1Capacity</code>&nbsp;和 <code>jug2Capacity</code> 升。水的供应是无限的。确定是否有可能使用这两个壶准确得到&nbsp;<code>targetCapacity</code> 升。</p>\n\n<p>如果可以得到&nbsp;<code>targetCapacity</code>&nbsp;升水,最后请用以上水壶中的一或两个来盛放取得的&nbsp;<code>targetCapacity</code>&nbsp;升水。</p>\n\n<p>你可以:</p>\n\n<ul>\n\t<li>装满任意一个水壶</li>\n\t<li>清空任意一个水壶</li>\n\t<li>从一个水壶向另外一个水壶倒水,直到装满或者倒空</li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1:</strong>&nbsp;</p>\n\n<pre>\n<strong>输入:</strong> jug1Capacity = 3, jug2Capacity = 5, targetCapacity = 4\n<strong>输出:</strong> true\n<strong>解释</strong>:来自著名的&nbsp;<a href=\"https://www.youtube.com/watch?v=BVtQNK_ZUJg\"><em>\"Die Hard\"</em></a></pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong> jug1Capacity = 2, jug2Capacity = 6, targetCapacity = 5\n<strong>输出:</strong> false\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong> jug1Capacity = 1, jug2Capacity = 2, targetCapacity = 3\n<strong>输出:</strong> true\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= jug1Capacity, jug2Capacity, targetCapacity &lt;= 10<sup>6</sup></code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 356,
"likes": 357,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"38K\", \"totalSubmission\": \"101K\", \"totalAcceptedRaw\": 37965, \"totalSubmissionRaw\": 100993, \"acRate\": \"37.6%\"}",
"stats": "{\"totalAccepted\": \"38K\", \"totalSubmission\": \"101.1K\", \"totalAcceptedRaw\": 38032, \"totalSubmissionRaw\": 101117, \"acRate\": \"37.6%\"}",
"hints": [],
"solution": null,
"status": null,