uva 11134 Fabled Rooks
http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2075