Stable Arrangement of Rooks

Problem Name:
Stable Arrangement of Rooks
Site:CodeForces
Links:
Tags:
Problem setters: