I have been trying to solve this problem, but I am not able to find any good approach.

**Problem:** Problem Link

To view the problem and submit maybe, you have to first join the group:

After joining the group, you can view and submit the problem.

Here I am attaching the text of problem.

**Problem Text**

Thank you very much for your time and for helping me.