- PR -

Look! Ma' the script can compute!

投稿者投稿内容
Oregon
ベテラン
会議室デビュー日: 2001/08/01
投稿数: 52
お住まい・勤務地: Tualatin 97062
投稿日時: 2001-11-11 10:09
here're solutions up to N(9) using C++

コード:
size: 1
sum: 1
1
(unique solutions: 1,  max element 1)

size: 2
sum: 3
1 2
(unique solutions: 1,  max element 2)

size: 3
sum: 7
1 2 4
1 4 2*
(unique solutions: 1,  max element 4)

size: 4
sum: 13
1 2 6 4
1 3 2 7
1 4 6 2*
1 7 2 3*
(unique solutions: 2,  max element 7)

size: 5
sum: 21
1 3 10 2 5
1 5 2 10 3*
(unique solutions: 1,  max element 10)

size: 6
sum: 31
1 2 5 4 6 13
1 2 7 4 12 5
1 3 2 7 8 10
1 3 6 2 5 14
1 5 12 4 7 2*
1 7 3 2 4 14
1 10 8 7 2 3*
1 13 6 4 5 2*
1 14 4 2 3 7*
1 14 5 2 6 3*
(unique solutions: 5,  max element 14)

size: 7
sum: 39
1 2 8 6 13 5 4
1 3 14 6 5 2 8
1 4 2 7 3 8 14
1 4 3 9 2 15 5
1 4 5 13 6 8 2*
1 5 15 2 9 3 4*
1 6 2 3 13 4 10
1 8 2 5 6 14 3*
1 9 3 5 2 4 15
1 10 4 13 3 2 6*
1 14 8 3 7 2 4*
1 15 4 2 5 3 9*
(unique solutions: 6,  max element 15)

size: 8
sum: 57
1 2 10 19 4 7  9 5
1 3 5 11 2 12 17 6
1 3 8  2 16 7 15 5
1 4 2 10 18 3 11 8
1 4 22 7  3 6 2 12
1 5 9  7 4 19 10 2*
1 5 15 7 16 2  8 3*
1 6 12 4 21 3  2 8
1 6 17 12 2 11 5 3*
1 8  2 3 21 4 12 6*
1 8 11 3 18 10 2 4*
1 12 2 6 3  7 22 4*
(unique solutions: 6,  max element 22)

size: 9
sum: 73
1 2 4 8 16 5 18 9 10
1 6 4 24 13 3 2 12 8
1 8 12 2 3 13 24 4 6*
1 10 9 18 5 16 8 4 2*
1 11 8 6 4 3 2 22 16
1 16 22 2 3 4 6 8 11*
(unique solutions: 3,  max element 24)




N(10) and above are hopeless (> 10 weeks ?)
without switching to new algorithms and/or
using screamingly fast machines.

スキルアップ/キャリアアップ(JOB@IT)