I\'m working on a school project that puts me in a situation similar to this question. To sum up, our objective is to code a grid gerrymandering : given a N*M grid, each squ