Hello! On Saturday 15th September 16:00 UTC the contest HackerEarth HourStorm #3 will take place. It’s the third version of a short contest, that runs for 1 hour! The problem set consists of 3 traditional algorithmic tasks of various difficulties.

For traditional algorithmic tasks, you will receive points for every test case your solution passes — so you can get some points with partial solutions as well. Keeping the IOI tradition alive, the order of the difficulty of getting full points might be different from the order of difficulty of getting partial points, so make sure you read all the tasks. Check contest page for more details about in-contest schedule and rules.

I am the author of the tasks; but don't despair, they'll be (slightly) easier than my last CF round! Many thanks to jtnydv25 for testing and valuable feedback. As usual, there will be some prizes for the top three competitors:

- $75 Amazon gift card
- $50 Amazon gift card
- $25 Amazon gift card

In addition, top 5 on the scoreboard with rating less than 1600 will win HackerEarth t-shirts.

Good luck to everyone, and let's discuss the problems after the contest!

UPD: Contest finished. Winners:

jtnydv25 and majk

Really excited about this contest.

It clashes with CodeNation CodeAgon :( Can you postpone your contest and keep it before CF 509 Div2?

I'm afraid it's too late to move any of the contests. There are just too many of them!

Reminder: contest starts in 22 minutes.

Is the leaderboard acting up? One of my later submission is not showing up.

https://www.hackerearth.com/challenge/competitive/sept-hourstorm-3/leaderboard/

About the problem C: I suppose that it's pattern matching with some gaps. How to deal with the gaps efficiently? I mean without getting a penalty of log(m) for each gap as I would use hashing to bin search each.

See editorial: You can use suffix structures and precompute RMQ LCP in , so that you can match in

O(1).Wow, nice. Thank you, the hint was enough :)

What a contest! No more than 120 people could get a positive score :P

Hello Sir, there has been an inaccuracy in judging some solutions, I only got 14 marks, where I deserved 100/100 , I even checked the author's solution, ran both of them(mine and author's) against all the 4 inputs and all of them give exactly same output. Please look into this matter.

Ignore this one, I realized the mistake in my solution, I bymistakely calculated primes from l-1 to r, it really sucks