![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
牛客题解
专栏:考研复试专题
光头强12138
这个作者很懒,什么都没留下…
展开
-
KY141 最大连续子序列
KY141 最大连续子序列 题解题目地址题目描述 给定K个整数的序列{ N1, N2, ..., NK }, 其任意连续子序列可表示为{ Ni, Ni+1, ..., Nj }, 其中 1 <= i <= j <= K。最大连续子序列是所有连续子序列中元素和最大的一个, 例如给定序列{ -2, 11, -4, 13, -5, -2 },其最大连续子序列为{ 11, -4, 13 },最大和为20。 现在增加一个要求,即还需要输出该子序列的第一个和最后一个元素。输入测原创 2022-04-08 11:29:39 · 256 阅读 · 0 评论 -
KY261 Jugs
KY261 Jugs题目地址相对素数:不能被所有给定的整数(除了0)整除的数题目描述:In the movie "Die Hard 3", Bruce Willis and Samuel L. Jackson were confronted with the following puzzle. They were given a 3-gallon jug and a 5-gallon jug and were asked to fill the 5-gallon jug with exactly原创 2022-03-27 11:30:49 · 451 阅读 · 0 评论