AtCoder Beginner Contest 340C - Divide and Divide
problemlinkNaively,abruteforcerecursionsolutionbeimplementedwithO(n)\mathcalO(n)O(n)complexity.intwork(intx){if(x==1)return0;returnx+work(x>>1)+work((x>>1)+(x&1))}However,sinceallpossiblexxxcanberepre