How to solve Sereja and Increasing subsequence from Codechef DEC16?

Revision en1, by sdssudhu, 2017-04-04 16:35:40

Link to question -- https://www.codechef.com/DEC16/problems/SEAINCR/

Could anybody give me a detailed explanation of how to solve this question from Codechef DEC16 long challenge.

Note : I know to find LIS in O(nlogn) but due to the number of queries my solution gets 30 points and gets a TLE in larger cases.

Tags increasing subsequence, lis

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English sdssudhu 2017-04-04 16:35:40 384 Initial revision (published)