Hint: Let $k$ be the LIS of the whole sequence. Then, the LCM of all subarray LIS-s is exactly equal to the LCM of $1, 2, \ldots k$

Statistics

84% Solution Ratio
Shahwat_Has9Earliest, Dec '20
Shahwat_Has9Fastest, 0.0s
Shahwat_Has9Lightest, 0 B
steinumShortest, 254B
Toph uses cookies. By continuing you agree to our Cookie Policy.