Max Sum Subarray of atleast 2 numbers

Правка en1, от Timosh, 2024-04-20 19:37:16

Hello Codeforces. Recently I faced a problem which I couldn't solve in an hour. It is as follows: Max Sum Subarray of atleast 2 numbers. Of course, for just max sum subarray it is Kadane's algorithm in O(n) time, however, I couldn't think of a way to solve for atleast 2 numbers faster than O(n^2). Any idea or a solution?

Теги problem, help

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Timosh 2024-04-20 20:39:35 66
en1 Английский Timosh 2024-04-20 19:37:16 362 Initial revision (published)