Domino piling

Problem Name:
Domino piling
Site:CodeForces
Links:
Tags:
Problem setters: