Subarray with given length and maximum sum
Difference between en1 and en2, changed 6 character(s)
I solved [this](http://www.usaco.org/index.php?page=viewproblem2&cpid=419) problem using binary search the answer, substracting it from each element of the array and finding its subarray with the largest sum. Then I tried came up with a different approach: we can iterate through possible lenghts of subarray, pick one with the largest sum and update the answer. However, I don't know how to implement finding a subarray with length = 1..n and maximum sum. 

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en8 English Honey_Badger 2020-09-22 22:43:28 9
en7 English Honey_Badger 2020-09-22 22:40:52 1
en6 English Honey_Badger 2020-09-22 22:40:30 4 Tiny change: 'sible lenghts of a suba' -> 'sible length of a suba'
ru2 Russian Honey_Badger 2020-09-22 22:33:22 189
en5 English Honey_Badger 2020-09-22 22:31:34 142
ru1 Russian Honey_Badger 2020-09-22 21:17:36 543 Первая редакция перевода на Русский
en4 English Honey_Badger 2020-09-22 21:03:24 2 Tiny change: 'enghts of subarray,' -> 'enghts of a subarray,'
en3 English Honey_Badger 2020-09-22 21:02:07 30 Tiny change: 'aximum sum. ' -> 'aximum sum fast enough to pass all tests. '
en2 English Honey_Badger 2020-09-22 20:59:29 6 Tiny change: 'm. Then I tried came up w' -> 'm. Then I came up w'
en1 English Honey_Badger 2020-09-22 20:58:25 499 Initial revision (published)