mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 00:11:41 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "小扣有一个根结点为 `root` 的二叉树模型,初始所有结点均为白色,可以用蓝色染料给模型结点染色,模型的每个结点有一个 `val` 价值。小扣出于美观考虑,希望最后二叉树上每个蓝色相连部分的结点个数不能超过 `k` 个,求所有染成蓝色的结点价值总和最大是多少?\n\n\n**示例 1:**\n> 输入:`root = [5,2,3,4], k = 2`\n>\n> 输出:`12`\n>\n> 解释:`结点 5、3、4 染成蓝色,获得最大的价值 5+3+4=12`\n\n\n\n**示例 2:**\n> 输入:`root = [4,1,3,9,null,null,2], k = 2`\n>\n> 输出:`16`\n>\n> 解释:结点 4、3、9 染成蓝色,获得最大的价值 4+3+9=16\n\n\n\n\n**提示:**\n+ `1 <= k <= 10`\n+ `1 <= val <= 10000`\n+ `1 <= 结点数量 <= 10000`\n ",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 45,
|
||||
"likes": 50,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -150,7 +150,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"3.2K\", \"totalSubmission\": \"6.2K\", \"totalAcceptedRaw\": 3224, \"totalSubmissionRaw\": 6224, \"acRate\": \"51.8%\"}",
|
||||
"stats": "{\"totalAccepted\": \"3.6K\", \"totalSubmission\": \"6.7K\", \"totalAcceptedRaw\": 3552, \"totalSubmissionRaw\": 6694, \"acRate\": \"53.1%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user