Dominoes: Difference between revisions

Content added Content deleted
m (add another layout)
Line 153: Line 153:
end
end
@time findlayouts()
@time findlayouts()

const t2 = [
6 4 2 2 0 6 5 0;
1 6 2 3 4 1 4 3;
2 1 0 2 3 5 5 1;
1 3 5 0 5 6 1 0;
4 2 6 0 4 0 1 1;
4 4 2 0 5 3 6 3;
6 6 5 2 5 3 3 4
]
@time lays = findlayouts(t2, dominoes)
printlayout(first(lays))
println(length(lays), " layouts found.")
</lang>{{out}}
</lang>{{out}}
<pre>
<pre>
Line 170: Line 183:


0.003087 seconds (26.93 k allocations: 2.326 MiB)
0.003087 seconds (26.93 k allocations: 2.326 MiB)
</pre>


0.062496 seconds (395.91 k allocations: 44.811 MiB, 11.69% gc time)
6 4 2 2 0 6+5 0
+ + + + + +
1 6 2 3 4 1+4 3


2 1 0 2 3+5 5 1
+ + + + + +
1 3 5 0 5 6 1 0
+ +
4 2 6 0 4 0 1+1
+ + + +
4 4 2 0 5 3 6 3
+ + + +
6+6 5+2 5 3 3 4
2025 layouts found.
</pre>


=={{header|Perl}}==
=={{header|Perl}}==