Hi everyone, can someone explain the solution for this problem Link https://www.codechef.com/COX2019/problems/CHESHCYC It seems that this problem needs inclusion exclusion principle and binary search but i can't figure it out... If anyone is interested to see the accepted solution link https://www.codechef.com/viewsolution/27600843 Please help...