mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 05:26:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给出两个整数 <code>n</code> 和 <code>k</code>,找出所有包含从 <code>1</code> 到 <code>n</code> 的数字,且恰好拥有 <code>k</code> 个逆序对的不同的数组的个数。</p>\n\n<p>逆序对的定义如下:对于数组的第<code>i</code>个和第 <code>j</code>个元素,如果满<code>i</code> < <code>j</code>且 <code>a[i]</code> > <code>a[j]</code>,则其为一个逆序对;否则不是。</p>\n\n<p>由于答案可能很大,只需要返回 答案 mod 10<sup>9</sup> + 7 的值。</p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> n = 3, k = 0\n<strong>输出:</strong> 1\n<strong>解释:</strong> \n只有数组 [1,2,3] 包含了从1到3的整数并且正好拥有 0 个逆序对。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong> n = 3, k = 1\n<strong>输出:</strong> 2\n<strong>解释:</strong> \n数组 [1,3,2] 和 [2,1,3] 都有 1 个逆序对。\n</pre>\n\n<p><strong>说明:</strong></p>\n\n<ol>\n\t<li> <code>n</code> 的范围是 [1, 1000] 并且 <code>k</code> 的范围是 [0, 1000]。</li>\n</ol>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 233,
|
||||
"likes": 236,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -137,7 +137,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"19.4K\", \"totalSubmission\": \"37.4K\", \"totalAcceptedRaw\": 19432, \"totalSubmissionRaw\": 37368, \"acRate\": \"52.0%\"}",
|
||||
"stats": "{\"totalAccepted\": \"19.6K\", \"totalSubmission\": \"37.8K\", \"totalAcceptedRaw\": 19631, \"totalSubmissionRaw\": 37793, \"acRate\": \"51.9%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user