"# Rook-Polynomial"
to use this code you don't need to give the board size independently.
this code will get an string from you.
let's say you gave this : 1 1 2 1 3 2 4 1 6 7 then Your coordinates will be like this :
(y,x)
(1,1),(2,1),(3,2),(4,1),(6,7)
in a 6*7 board which just has the coordinates you gave (1) and other coordinates will be zero.
the rook polynomial will be calculated on board with 6*7 size but just with cells that is 1.(which you gave.)
and the rook polynomial will be this : 1+5x^1+7x^2+3x^3.
be careful given coordinates should be positive. (coordinates start from 1 both in x and y directions.)
y direction is down to up and x direction is left to right.