英语翻译 Maximum sum
OpenJudge - 1481:Maximum sum
2022 2.10
Given a set of n integers: A={a1, a2,..., an}, we define a function d(A) as below:
给定一组n个整数:A={a1,a2,…,an},我们定义函数d(A)如下:
t1 t2
d(A) = max{ ∑ai + ∑aj | 1 <= s1 <= t1 < s2 <= t2 <= n }
i=s1 j=s2
d(A)为两段和的最大值,不相交。 Your task is to calculate d(A).
你的任务是计算d(A).
输入
The input consists of T(<=30) test cases. The number of test cases T is given in the first line of the input.
输入由T(
共有 0 条评论