A range problem

Revision en1, by nhphuc, 2025-04-26 14:07:57

Summary: Given an array $$$A$$$ with $$$N$$$ elements. Find the largest continous subbarray $$$(l,\ r)$$$ of $$$A$$$ that: $$$max(A_l,\ A_{l + 1},\ ...,\ A_r)\ \vdots\ min(A_l,\ A_{l + 1},\ ...,\ A_r)$$$. Print the value $$$r - l + 1$$$. Constraits: $$$n\leq 6\times 10^5,\ a_i\leq 10^5\forall\ 1\leq i\leq n$$$

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English nhphuc 2025-04-26 14:12:58 24 Tiny change: 'i\leq 10^5\\ forall\ 1\leq i\leq n$.\n\nSubt' -> 'i\leq 10^5$.\n\nSubt'
en2 English nhphuc 2025-04-26 14:12:12 355 (published)
en1 English nhphuc 2025-04-26 14:07:57 298 Initial revision (saved to drafts)