November Lunchtime Editorials

@skpro19 if you get the logic then please explain it. it will be a great help :slight_smile:

@taran_1407 please elaborate the observation 2 in the last question!

@pk301, i have added an explanation in answers.

1 Like

@pk301, are you on codeforces?

@taran_1407 thanks a lot!

one more thing please…it is written : “(min and max on the segment in the segment tree, dp[2][2], dp[2][2] and other things)”. What is the need to store min and max? We can calculate dp values by hand at base level and thus can combine them to get answrs for higher level. so, what is the need for them?

and last thing i have understood how to add elements(just add a node at last) but how to support erase operations? is min and max is something that requires for this one?

Mate, i haven’t myself implemented the solution yet. I knew about 2nd observation, so i wrote the proof here…

okay thanks taran but one request if you implement it in future please provide the solution link.

@skpro19 yes!

If i implement, i will post solution link.

@pk301 username?

@skpro19 pk845