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