Serval and Inversion Magic

Problem Name:
Serval and Inversion Magic
Site:CodeForces
Links:
Tags:
Problem setters: