[Help] LIS type of problem.

Revision en2, by Whimsical_HITMAN, 2023-10-24 12:25:11

https://www.spoj.com/problems/ONEXLIS/

i have been trying to solve the problem for a long time...but couldnt come up with a proper approach... My approach(ig wrong) : when we consider a sequence to be lis, the elements before the last element must have lds(longest strictly decreasing subsequence) > 1; however im unable to implement the idea; any help would be appreciated.

Tags lis, dp, doubt

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Whimsical_HITMAN 2023-10-24 12:25:11 45
en1 English Whimsical_HITMAN 2023-10-24 01:16:57 413 Initial revision (published)