1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 23:41:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2023-12-09 19:57:46 +08:00
parent 9bc4722a45
commit 3770b44d1e
4792 changed files with 10889 additions and 10886 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>假设你是一位很棒的家长,想要给你的孩子们一些小饼干。但是,每个孩子最多只能给一块饼干。</p>\n\n<p>对每个孩子 <code>i</code>,都有一个胃口值 <code>g[i]</code><sub></sub>这是能让孩子们满足胃口的饼干的最小尺寸;并且每块饼干 <code>j</code>,都有一个尺寸 <code>s[j]</code><sub> </sub>。如果 <code>s[j] >= g[i]</code>,我们可以将这个饼干 <code>j</code> 分配给孩子 <code>i</code> ,这个孩子会得到满足。你的目标是尽可能满足越多数量的孩子,并输出这个最大数值。</p>\n \n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> g = [1,2,3], s = [1,1]\n<strong>输出:</strong> 1\n<strong>解释:</strong> \n你有三个孩子和两块小饼干3个孩子的胃口值分别是1,2,3。\n虽然你有两块小饼干由于他们的尺寸都是1你只能让胃口值是1的孩子满足。\n所以你应该输出1。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong> g = [1,2], s = [1,2,3]\n<strong>输出:</strong> 2\n<strong>解释:</strong> \n你有两个孩子和三块小饼干2个孩子的胃口值分别是1,2。\n你拥有的饼干数量和尺寸都足以让所有孩子满足。\n所以你应该输出2.\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= g.length <= 3 * 10<sup>4</sup></code></li>\n\t<li><code>0 <= s.length <= 3 * 10<sup>4</sup></code></li>\n\t<li><code>1 <= g[i], s[j] <= 2<sup>31</sup> - 1</code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 811,
"likes": 812,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -161,7 +161,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"364.5K\", \"totalSubmission\": \"648.7K\", \"totalAcceptedRaw\": 364467, \"totalSubmissionRaw\": 648690, \"acRate\": \"56.2%\"}",
"stats": "{\"totalAccepted\": \"364.5K\", \"totalSubmission\": \"648.8K\", \"totalAcceptedRaw\": 364519, \"totalSubmissionRaw\": 648803, \"acRate\": \"56.2%\"}",
"hints": [],
"solution": null,
"status": null,