Korney Korneevich and XOR (hard version)

Problem Name:
Korney Korneevich and XOR (hard version)
Site:CodeForces
Links:
Tags:
Problem setters: