Honey_Badger's blog

By Honey_Badger, history, 4 years ago, In English

I solved this problem using technique which is mentioned in editorial. Then I came up with a different approach: we can iterate through the possible length of a subarray, pick one with the largest sum, update the answer. However, I don't know how to implement finding a subarray with length = 1..n and maximum sum fast enough to pass all tests.

  • Vote: I like it
  • +19
  • Vote: I do not like it

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Honey_Badger (previous revision, new revision, compare).

»
4 years ago, # |
  Vote: I like it +13 Vote: I do not like it

Same question was asked in this blog 5 years ago: https://codeforces.com/blog/entry/18276