I was recently solving this question using binary search(https://codeforces.me/problemset/problem/1201/C). I came to know about my mistake as my formula for calculating mid was low+(high-low)/2 but instead when I use low+(high-low+1)/2 I get AC.↵
↵
My questions ishow do all of you know which formula to use for calculating midwhen do we use low+(high-low+1)/2. I tried to google it and could not find any link which answers my question.
↵
My questions is