Hello there
I'm trying to solve this problem D div1 from round 345
if you haven't read it it's about finding LIS for each query where each query we change the value of a number independently
doing just like the editorial said and using persistent segment trees i keep getting MLE
i tried optimizing the memory usage but no use
if anyone could find the reason for memory leak it would be really awesome
here's the code