I have been trying very hard to get to the solution of this problem. Please help me with some hints.↵
[Problem link](https://codeforces.net/edu/course/2/lesson/5/4/practice/contest/280801/problem/F)↵
↵
↵
[Problem link](https://codeforces.net/edu/course/2/lesson/5/4/practice/contest/280801/problem/F)↵
↵
↵