This is my personal note and might be some kind of user editorial/learning material for some people!
This is the first episode of this "note" series. I will write notes on problems (normally around 2400-ish problems), which are completely solved by myself without looking at the editorial, that are both interesting and educational.
If you want to motivate me to write a continuation (aka note 2), a significant upvote from you would be well appreciated!
Problem link: ABC133F
Try to solve the task independently before continuing the blog.
Hint
Half solution
That reduces the problem to $$$O(N ^ 2)$$$, lets optimize it!
optimization
This allows an $$$O(N log N)$$$ solution
Feel free to ask anything about the task. I will try to respond them if I am free.