Hello Codeforces Community,
HackerEarth March Easy'17 will start at 9:30 PM IST on 1st March. The contest is of 3 hours. It will be a rated contest and is open for everyone.
There will be 6 algorithmic problems of various difficulty level. Problems are prepared by me (vaibhavjaimini). They have been thoroughly tested by usaxena95 and editorials are prepared by r3gz3n. Thanks to belowthebelt and r3gz3n for their help in preparing this contest and to MazzForces for his feedback on problems. This is the first time I am preparing a contest, so it'll be great to have some feedback.
Prizes: Top 5 beginners (1st year or 2nd year) will receive HackerEarth Tshirts.
Hope you'll enjoy the problems. Good luck and happy coding!!.
UPD: Contest starts in 30 minutes.
UPD: Contest is over. Here are the top 5:
Kudos to everyone who participated!! Editorials will be live soon. Any feedback or discussion on problems is welcome.
How to do the 4th problem ?
Editorial for this problem is live https://www.hackerearth.com/practice/data-structures/advanced-data-structures/fenwick-binary-indexed-trees/practice-problems/algorithm/micro-and-array-function/editorial/
Since editorial is not uploaded till now for this problem : Micro and Lucky Tree Can someone explain the approach for this ?
I solved this problem with a dp[atualNode][currentGcd]. The base case is when a node is a leaf. In this case, the answer is 1 if a gcd(currentGcd, numberInLeaf) is 1. For other nodes, you can choose any number between 1 and m to atualNode, and continue solve for child nodes. The answer for node atualNode is a multiplication of all pair of child nodes.