mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 19:31:42 +08:00
存量题库数据更新
This commit is contained in:
@@ -1,21 +1,23 @@
|
||||
<p>给你 <code>n</code> 笔订单,每笔订单都需要快递服务。</p>
|
||||
|
||||
<p>请你统计所有有效的 收件/配送 序列的数目,确保第 <code>i</code> 个物品的配送服务 <code>delivery(i)</code> 总是在其收件服务 <code>pickup(i)</code> 之后。</p>
|
||||
<p>计算所有有效的 取货 / 交付 可能的顺序,使 delivery(i) 总是在 pickup(i) 之后。</p>
|
||||
|
||||
<p>由于答案可能很大,请返回答案对 <code>10^9 + 7</code> 取余的结果。</p>
|
||||
<p>由于答案可能很大,请返回答案对 10^9 + 7 取余的结果。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>n = 1
|
||||
<pre>
|
||||
<strong>输入:</strong>n = 1
|
||||
<strong>输出:</strong>1
|
||||
<strong>解释:</strong>只有一种序列 (P1, D1),物品 1 的配送服务(D1)在物品 1 的收件服务(P1)后。
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>n = 2
|
||||
<pre>
|
||||
<strong>输入:</strong>n = 2
|
||||
<strong>输出:</strong>6
|
||||
<strong>解释:</strong>所有可能的序列包括:
|
||||
(P1,P2,D1,D2),(P1,P2,D2,D1),(P1,D1,P2,D2),(P2,P1,D1,D2),(P2,P1,D2,D1) 和 (P2,D2,P1,D1)。
|
||||
@@ -24,7 +26,8 @@
|
||||
|
||||
<p><strong>示例 3:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>n = 3
|
||||
<pre>
|
||||
<strong>输入:</strong>n = 3
|
||||
<strong>输出:</strong>90
|
||||
</pre>
|
||||
|
||||
|
Reference in New Issue
Block a user