1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 15:31:43 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>给你&nbsp;<code>n</code>&nbsp;笔订单,每笔订单都需要快递服务。</p>\n\n<p>请你统计所有有效的 收件/配送 序列的数目,确保第 <code>i</code> 个物品的配送服务&nbsp;<code>delivery(i)</code> 总是在其收件服务&nbsp;<code>pickup(i)</code> 之后。</p>\n\n<p>由于答案可能很大,请返回答案对 <code>10^9 + 7</code> 取余的结果。</p>\n\n<p>&nbsp;</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>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= n &lt;= 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."
],