摘要:
题目描述 There are $n$ persons who initially don't know each other. On each morning, two of them, who were not friends before, become friends. We want to 阅读全文
摘要:
"题面" 分析 定义两个数组:$sum1$和$sum2$。 $sum1[i]$表示前$i$个数的最大区间和,$sum2[i]$表示后$i$个数的最大区间和。 最后从$1$到$n k 1$中找最大的两端区间和,即$max(sum1[i]+sum2[i+k+1])$。 代码 c++ include in 阅读全文