How to solve this Problem?

Revision en1, by It_was_a_nice_journey, 2020-04-07 17:54:39

A part of this Problem :

For every query range [L,R] (1 <= L<= R <= n) How to calculate maximum length subarray of 1 within segment [L,R].

1 <= n,query <= 100000

  • n = 10
  • [1, 9, 2, 3, 1, 1, 1, 4, 1, 1]
  • L = 3 , R = 10
  • answer = 3

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English It_was_a_nice_journey 2020-04-07 17:54:39 361 Initial revision (published)