CodeChef April Cook-Off 2018 will be on Sunday, 22nd April, 2018 at 21:30 IST.
This is the first contest that I set this year. So far I set only one contest per year, so it can be called alei yearly contest :)
There will be 5 puzzles for each division, and you have to solve them in 2.5h. I challenge top coders to solve it in yandex time i.e ~100 minutes.
The puzzles are based on the problems faced by Suzumo in his daily life at ChefLand.
See you in the ranklist!
UPD. Congratulations to the winners!
Div 1
tourist (perfect score) natsugiri ilyakor
Div 2
Sunday "20"?"22" at 21:30 (IST)?
Thank you for noticing.
The contest starts in ~3h.
What was the intended solution for RUNDIR? I tried to do binary search + 2-SAT but kept getting TLE.
I solved it using dynamic programming. Sort all the positions and try all possibilities. Here's my solution for reference https://www.codechef.com/viewsolution/18338444
I solved it using 2-d dp, where one state is of index on which you are and 2nd state is the direction of previous index ( ie it went left or right ).
Have a look at this for transitions.
First sort all points by x co-ordinate.
Now binary search on time and greedily assign left or right to all points (first try to assign left if not assign right). If it is possible to assign all points then the given time is possible
My solution : https://www.codechef.com/viewsolution/18338433
Spent 2hrs debugging my solution, but couldn't, Can anyone find any bugs in my solution.
Morphy can you give me the testcase on which my code fails? Thanks :)
Link to solution
never mind, had some bug while printing double value
Hope you enjoyed the contest!
Unofficial editorials in my blog: https://aleigorithms.wordpress.com/2018/04/21/april-cook-off-2018/
WHERE IS RUSSIAN STATEMENTS?????!?!?!?!?!??!?!?!?!?!!??!?!?!!