Max Sum of Max-K-sub-sequence
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 9826 Accepted Submission(s): 3639
Problem Description
Given a circle sequence A[1],A[2],A[3]......A[n]. Circle sequence means the left neighbour of A[1] is A[n] , and the right neighbour of A[n] is A[1].
Now your job is to calculate the max sum of a Max-K-sub-sequence. Max-K-sub-sequence means a continuous non-empty sub-sequence which length not exceed K.
Input
The first line of the input contains an integer T(1<=T<=100) which means the number of test cases.
Then T lines follow, each line starts with two integers N , K(1<=N<=100000 , 1<=K<=N), then N integers followed(all the integers are

Given a circular sequence, find the maximum sum of a subsequence with length at most K using a monotonic queue. The problem involves maintaining an increasing deque to update the maximum sum and the corresponding start and end positions."
135006063,10438595,4C大赛信息可视化获奖攻略:赛道解析与实战经验,"['计算机设计大赛', '信息可视化设计', '数据可视化', '图形设计', '动态影像']
最低0.47元/天 解锁文章
574

被折叠的 条评论
为什么被折叠?



