Hello everyone

I would like to invite you all to the last HackerEarth Clash of the year starting in around 28 hours (link to register here, check your time zone here). The contest will last 24 hours.

There will be five algorithmic problems and one approximation (optimization) problem. Read the problems for details on partial scoring for easier subtasks. I tried to make this clash slightly easier than my previous clashes, so hopefully there will be more than 1 perfect score on the algorithm problems. I hope you find the problems interesting nonetheless.

I would like to thank usaxena95 for all his help in testing, editing statements, and writing editorials, and belowthebelt for all his help with the round.

There will be prizes — t-shirts and Amazon gift cards.

Hope to see you all at the contest!

Many interesting problems but the toughness is much higher than the usual Clashes(IMO).

I think it's clear that I really underestimated difficulty. Regardless, I'm glad you still find the problems interesting.

Isn't it actually better for some of the last problems to be this hard? In my opinion only one tie-breaker (the approximate task) is too restricting and not enough to find the best coder since it may just not be your type of problem and you don't have another way reach the top places.

It is completely fine though. The top coders would be loving it and it does state "There will be 5

toughalgorithmic and 1 Approximate (challenge) problem." in the about page.Havent seen these types of problems before and will be eagerly waiting for the editorial.

alternate solution to jumping tokens problem. Notice that after compressing adjacent characters with same value , if the number of components we get are > 3 then the answer is 2 , otherwise we can use dp where dp[x][y][z] = answer when size of first component = x , second component y and third component z.