Programming Contest Question: Counting Polyominos

后端 未结 7 668
醉酒成梦
醉酒成梦 2020-12-15 11:33

Please see my own answer, I think I did it!


Hi,

An example question for a programming contest was to write a program that finds out ho

7条回答
  •  失恋的感觉
    2020-12-15 12:04

    The most naive solution is to start with a single X, and for each iteration, build the list of unique possible next-states. From that list, build the list of unique states by adding another X. Continue this until the iteration you desire.

    I'm not sure if this runs in reasonable time for N=10, however. It might, depending on your requirements.

提交回复
热议问题