The Battle of Mages

Problem Name:
The Battle of Mages
Site:CodeForces
Links:
Tags: