solved LIS problem with DP