Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Golf: Cabbage, Goat, Wolf

by hdb (Monsignor)
on Jan 06, 2014 at 16:02 UTC ( [id://1069541]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @s=(0,(grep{$_%3}1..14),15);%m=map{$t=$_,[grep{$z=($t^$_)&7;($t^$_)&8&
    +&
    !($t&8&&~$t&$_&7)&&!(~$t&8&&$t&~$_&7)&&($z<3||$z==4)}@s]}@s;sub t{@c=q
    +w
    (w g c b);join'',map{$_[0]&2**$_?$c[$_]:'_'}0..3}sub p{printf"%s %s\n"
    +,
    t(~$_),t($_)for@_;print$/}sub r{my($s,$e,$h,%s)=@_;($s==$e&&p@$h)||r($
    +_
    ,$e,[@$h,$_],$_=>1,%s)for grep{!$s{$_}}@{$m{$s}}}r+0,$s[-1],[0],0,1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1069541]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-03-28 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found