Carny Magician

Problem Name:
Carny Magician
Site:CodeForces
Links:
Tags:
Problem setters: