Hello Codeforces Community!!!
I invite you all to take part in Hackerearth's March Easy contest.The contest will be held on 1st March,2018 at 22:00 IST.
Problems have been set by allcodeAC and tested by trytolearn and me.
You will be given 5 algorithmic problems to solve in 3 hours. Partial scoring will be used (you get points for passing each test case). Although the contest is targeted towards beginners, we hope even experienced problem-solvers find one or two problems to be interesting. The contest is rated and prizes will be awarded to the top 3 beginners(i.e. Programmers with a rating of 1600 or less before the challenge starts).
Good luck and have fun.
Reminder: Contest is about to start in 30 minutes.Get Ready!!
Problem quality was better than last few beginner contests. Compliments !
The third problem looks really similar to this: https://agc018.contest.atcoder.jp/tasks/agc018_c. Can the same solution be applied on both problems?
No...You are not asked to select all the people...there are constraints on that too...I dont think a greedy solution will pass...still you can give it a try..If a greedy solution is possible then please discuss that solution over here...will get to learn something new!!
https://www.hackerearth.com/submission/15384584/ there we go. I remembered Petr's solution to this problem, it uses flow but in a smart way iirc so it works for this problem in general (Compress the vertices to the set of nodes chosen for each category, each category and the set of nodes not chosen or something like that). Its complexity is O(nodes * log(nodes)) and it works for this problem. https://agc018.contest.atcoder.jp/submissions/1449956