Isn't It Strange?

In the first test case,

For the sequence $[4, 2, 3, 2, 5]$,

$LIS(1, 1) = 1 , \, LIS(2, 2) = 1, \, LIS(3, 3) = 1, \, LIS(4, 4) = 1, \, LIS(5, 5) = 1,$ $LIS(1, 2) = 1, \, LIS(2, 3) = 2, \, LIS(3, 4) = 1, \, LIS(4, 5) = 2,$ $LIS(1, 3) = 2, \, LIS(2, 4) = 2, \, LIS(3, 5) = 2,$ $LIS(1, 4) = 2, \, LIS(2, 5) = 3,$ $LIS(1, 5) = 3$.


This is a companion discussion topic for the original entry at https://toph.co/p/on-the-sea