Egor in the Republic of Dagestan

Problem Name:
Egor in the Republic of Dagestan
Site:CodeForces
Links:
Tags:
Problem setters: