title: Approach to LIS2 on spoj
body: <p>I was solving problem <code>LIS2</code> on spoj <a href="http://www.spoj.com/problems/LIS2/.I" rel="nofollow">http://www.spoj.com/problems/LIS2/.I</a> came across
  2D segment tree but I guess it is not suitable for this problem.I read <code>misof</code> solution to
  <code>NICEDAY</code> on spoj which is similar to this problem according to this post:
  <a href="http://apps.topcoder.com/forums/;jsessionid=F39EBDDC41BEB792536BE044ADC8BA2A?module=Thread&amp;threadID=615154&amp;start=0&amp;mc=2" rel="nofollow">http://apps.topcoder.com/forums/;jsessionid=F39EBDDC41BEB792536BE044ADC8BA2A?module=Thread&amp;threadID=615154&amp;start=0&amp;mc=2</a>.
  Neither can't I understand the link between these two questions neither can I understand
  the complexity of misof's solution to <code>NICEDAY</code>.</p>
  
  <p>PS:I don't want the whole solution also I don't want any approach through 2D segment tree,
  as it will  be too complex for this problem(I have tried)</p>