|
发表于 2021-4-7 16:28:03
|
显示全部楼层
我的代码
计算 6 X 4 棋盘的结果,2秒多就出来了
但是 8 X 8 ,尝试过10分钟,都没有出结果
Please input the size of X :6
Please input the size of Y :4
Please input start point : 11
++++++++++++++++++ Find one solution ++++++++++++++++
['11', '23', '31', '12', '24', '32', '51', '63', '44', '52', '64', '43', '62', '41', '53', '61', '42', '54', '33', '14', '22', '34', '13', '21']
[1, 4, 7, 1, 4, 3, 1, 7, 4, 1, 6, 3, 6, 1, 4, 7, 1, 6, 7, 4, 1, 6, 4, 1]
+++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++ Find one solution ++++++++++++++++
['11', '32', '51', '63', '44', '23', '31', '52', '64', '43', '24', '12', '33', '14', '22', '34', '13', '21', '42', '54', '62', '41', '53', '61']
[2, 3, 1, 7, 6, 4, 2, 1, 6, 7, 5, 2, 7, 4, 1, 6, 4, 2, 1, 4, 6, 1, 4, 1]
+++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++ Find one solution ++++++++++++++++
['11', '32', '51', '63', '44', '23', '31', '12', '24', '43', '64', '52', '33', '14', '22', '34', '13', '21', '42', '54', '62', '41', '53', '61']
[2, 3, 1, 7, 6, 4, 7, 1, 3, 2, 5, 7, 7, 4, 1, 6, 4, 2, 1, 4, 6, 1, 4, 1]
+++++++++++++++++++++++++++++++++++++++++++++++++++++
Use 2.272 second.
|
|