xinyu04

导航

2022年5月6日 #

LiberOJ 10014 数列分段 II 二分

摘要: 题意 给定长度为 \(N\) 的序列 \(A\),要将其划分为连续的 \(M\) 段,并最小化每一段总和的最大值。 输入格式 第1行包含两个正整数 \(N,M\) 第2行包含 \(N\) 个空格隔开的非负整数 \(A_i\),含义如题目所述。 输出格式 仅包含一个正整数,即每段和最大值最小为多少。 阅读全文

posted @ 2022-05-06 04:32 Blackzxy 阅读(31) 评论(0) 推荐(0) 编辑

LeetCode 113 Path Sum II DFS

摘要: Given the root of a binary tree and an integer targetSum, return all root-to-leaf paths where the sum of the node values in the path equals targetSum. 阅读全文

posted @ 2022-05-06 03:20 Blackzxy 阅读(10) 评论(0) 推荐(0) 编辑