Codeforces Round#430 div 2 Problem D

How should I solve this problem?

Problem link:- Problem - D - Codeforces

1 Like

I found the solution, [Tutorial] CodeForces Round #430 - Problem D [Tries, Math, XOR] - YouTube

Thanks, Rachit Jain for making the video on this problem.