Please read the new rule regarding the restriction on the use of AI tools. ×

How can i space optimize this ?
Difference between en1 and en2, changed 2 character(s)

I'm getting MLE at test 33 here is the [problem](https://codeforces.net/problemset/problem/4/D/)↵

and my [submission](https://codeforces.net/contest/4/submission/253523013) ↵

here i used LIS dp -> time O(N^2), space O(N^2) .... i don't know how to convert space to O(n) and also at the same time get a particular solution.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Aniket54 2024-03-30 21:28:43 2 Tiny change: 'I'm gettin' -> '\nI'm gettin' (published)
en1 English Aniket54 2024-03-30 21:28:17 357 Initial revision (saved to drafts)