Are you the kind of person who spends sleepless nights learning new algorithms. Do you use data structures as if it’s your pen? And do you speak code?
It’s time to hone your problem-solving skills. Get ready with your laptops and put your brains in use cause this Aarohan 2020, we bring you again our very own coding challenge Decathlon where you will be put to test against some of the best coders. So bring out the gladiator within you and put the destruction mode on 9th February 2020 at 10 pm.
The contest will be held on the Codechef platform.
The contest consists of 6 problems to be solved in 2:15 hours.
There were multiple mistakes in Sums question’s statement. Thats why many people got WA. I suggested many times in comments to clarify/change it but you guys replied “No-comments”. I guess finally after 1-hour question was updated, that you have to print “-1” in case no subarray exists.(also a(i)>=0)…Still 2-3 guys managed to get AC without this info … Just Wow…( Not very pleasant experience. )
It passes by Mo’s in \mathcal{O}(n \sqrt {n}) (0.3 secs).
You can add/erase elements to left/right in \mathcal{O}(1).
Just maintain sum of indices and frequency for each distinct element in current range.
The other AC solutions to this problem are not visible to me too.
The changes in constraints of Sums problem were very late. No one answered my comment asking if the constraints were wrong, and whether negative numbers are allowed if they were wrong. Wasted too much time (and penalty) on it.
Sorry for the problem Chef and Sum. I updated the statement earlier but forgot to sync it with the on-line contest. Apart from that, I assume that all of you like problems. Please provide your feedback about the problems.