BLKJK - Editorial

Could you please elaborate a bit(no pun intended) about your approach? Thanks!

Turned out we don’t even need state optimization to pass.
svatejas@, I left comments for this submission. CodeChef: Practical coding for everyone
Enjoy.

2 Likes

Thank you so much

@naveenls , Really a great observation :clap: :clap: . I was trying to understand the editorial for a long time and finally saw this post. Thanks for sharing your approach. Now i will try to code this solution.

Can you explain as to how you’re doing this final part i.e finding min(max(…) ) in ny time complexity? I tried using a segment tree but that takes ny*log(y) time and I’m getting TLE.