Hi, beginner here, so please don’t mind if my doubts are naive. I was doing this problem and got stuck on it since a couple of days. https://www.codechef.com/problems/CHMOD
I looked at the editorial too but I failed to understand what it meant. Tried debugging the code with few test cases, but still couldn’t understand it well. Would be really grateful if someone explained it in easy and simple manner along with the time complexity. Thank you.