This is my personal note and might be some kind of user editorial/learning material for some people!
This is the third episode of this "note" series. I will write notes on problems (normally around 2400-ish problems), which are completely solved without looking at the editorial, that are both interesting and educational. I normally will spend a few hours on each problem so please be patient when reading the blog.
If you want to motivate me to write a continuation (aka note 4), a significant upvote from you would be well appreciated! If I received lots of downvotes (because I'm also spending a lot of time to write this and to learn latex only to express my ideas accurately to you guys), I'm probably not gonna continuing writing these blogs.
Paraphrased problem:
Given a tree with $$$N$$$ nodes. Given $$$K$$$ nodes, $$$a_{1},a_{2},a_{3},...,a_{K}$$$. Initially these nodes are covered black and the remaining are colored white. Operation $$$X$$$ means that we will move $$$a_{(X-1) mod K + 1}$$$ and spread the black color to a neighboring node of your choice. This means we will move $$$a_{1},a_{2},a_{3},...a_{K},a_{1},a_{2}...$$$. No blocks can be colored black twice.
Can you continue the problem from here?
Good problem anyway, uses very simple concept but very cool implementation. XD
Hope you guys learnt something from this blog.