Codeforces DIV2 Round 651 - D : Odd-Even Subsequence Video Editorial

This is CodeNCode.

here is the video editorial
D : Odd-Even Subsequence

you can find more editorials and courses(like digit dp and Mo’s algorithm on tree) on my channel.

2 Likes

I was not able to solve this question during the contest. It’s not very obvious that binary search is involved in this problem. Do you have any tips on figuring out if the problem uses binary search, where it’s not that obvious at first look?

I always look for one think , if I can define a function which is monotonic and can be used to maximize / minimize the solution then I can apply binary search.

for example try aggressive cows(spoj) , snake eating (codechef snakedown contest).

try solving those problems.

I have explained in details all of these in my basic algorithms series along with practice problem.

you can look at those lectures if you want
Link to the course : null - YouTube

1 Like

Thanks!

I watched Aggressive cows on your channel yesterday, thoroughly explained! :+1:

Thanks