Well monks, it's a slow Friday for me here and I just coded up a program to solve a puzzle. If you've got nothing better to do you've got the solution... now you just need to find the question :).
for $p (0..14) {
$t[$p] = "000000010000000"; $t[7] = "1"x15;
substr($t[$p], $p, 1) = "1"; substr($t[$p], 14-$p, 1) = "1";
}
for $x (0..7) { for $y (0..7) {
$m[$x+($y*8)] .= substr($t[7-$y+$_], 7-$x, 8) for 0..7;
} }
$b = "0" x 64; $a = $b;
&z($_, $d+1) for 0..63;
$s =~ s/([^\n]{8})/$1\n/g; print $s;
sub z {
my ($p,$d) = @_;
($b & $m[$p]) ne $a?return:eval 'substr($b, $p, 1) = "1"';
$d == 8?eval '$s .= "$b|" if $s !~ /$b/':&z($_, $d+1) for 0..63;
substr($b, $p, 1) = "0";
}
Sorry about the code being a little squished... but I had to do it to make it easier to cut and paste... the code isn't terribly obfuscated or anything as I only spent enough time to get it down from 2k to under 512 bytes... it certainly isn't some confusing 1 liner (drats)...
Anyway... if any of you are interested enough good luck! If you have any questions about it, need hints or otherwise either post off of the thread or you can email me at gaspode_2000@yahoo.com...
Oh and as with most solutions to puzzles this one takes a pretty good time to find all the solutions... so you'll need a fast computer if you just wanted to let it run to find all the solutions... or let it run over the weekend... so good luck :)
UPDATE
Sorry about the compile problem guys!!!! I fixed it... I had been actually running a slightly different version on my system than what I was modifying... sorry about the confusion it is fixed now...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.