November Lunchtime Editorials

That thing was hard af to debug. I cant believe I missed that. set lowerbound and normal lowerbound. The more you know about STL XD

@vijju123 It took me 2 hours of thinking and googling to find it out. Glad to share it with others, and spare their time :stuck_out_tongue:

@taran_1407 There wasn’t too much messing

@vijju123 - Sorry xD i will try to put more readable code with some documentation before asking for help next time. Thank you for your efforts! and thanks bazsi once more.

@mgch can you please elaborate 2nd observation a little more?

Did you read @mgch 's answer?

@vijju123 which one?

@pk301, how did you solve it?

@vijju123, pleaseeee have a look at the formatting of LRQUER editorial… I tried to use latex feature, but couldn’t…

Help!!

@skpro19 i didn’t able to solve it for 100 but with a dp approach i get 27

@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