mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 15:31:43 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你 <code>n</code> 笔订单,每笔订单都需要快递服务。</p>\n\n<p>请你统计所有有效的 收件/配送 序列的数目,确保第 <code>i</code> 个物品的配送服务 <code>delivery(i)</code> 总是在其收件服务 <code>pickup(i)</code> 之后。</p>\n\n<p>由于答案可能很大,请返回答案对 <code>10^9 + 7</code> 取余的结果。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>n = 1\n<strong>输出:</strong>1\n<strong>解释:</strong>只有一种序列 (P1, D1),物品 1 的配送服务(D1)在物品 1 的收件服务(P1)后。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>n = 2\n<strong>输出:</strong>6\n<strong>解释:</strong>所有可能的序列包括:\n(P1,P2,D1,D2),(P1,P2,D2,D1),(P1,D1,P2,D2),(P2,P1,D1,D2),(P2,P1,D2,D1) 和 (P2,D2,P1,D1)。\n(P1,D2,P2,D1) 是一个无效的序列,因为物品 2 的收件服务(P2)不应在物品 2 的配送服务(D2)之后。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>n = 3\n<strong>输出:</strong>90\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= n <= 500</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 41,
|
||||
"likes": 42,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"3.3K\", \"totalSubmission\": \"6K\", \"totalAcceptedRaw\": 3335, \"totalSubmissionRaw\": 6023, \"acRate\": \"55.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"3.4K\", \"totalSubmission\": \"6.1K\", \"totalAcceptedRaw\": 3421, \"totalSubmissionRaw\": 6137, \"acRate\": \"55.7%\"}",
|
||||
"hints": [
|
||||
"Use the permutation and combination theory to add one (P, D) pair each time until n pairs."
|
||||
],
|
||||
|
Reference in New Issue
Block a user