I tried so many combinations and permutations of what could be answer the description does not help me much and the solutions does not help me understand why is that working...
Can somebody help me? problem link --> https://mirror.codeforces.com/contest/2095/problem/B



