Sasha and Magnetic Machines

Problem Name:
Sasha and Magnetic Machines
Site:CodeForces
Links:
Tags:
Problem setters: