Help for this page

Select Code to Download


  1. or download this
    grep!$s{$_}&!($s&8&&~$s&$_&7)&!(~$s&8&&$s&~$_&7)&&($z=$s^$_)&8&&(($z&=
    +7)<3|$z==4),15,grep$_%3,1..14
    
  2. or download this
    0-8    11-1    7-15
     \    /    \    /
      10-2      13-5
          \    /
           14-4
    
  3. or download this
    grep
      !$s{$_}              # we have not been at $_ already
    ...
      &&($z=$s^$_)&8       # the boat moves
      &&(($z&=7)<3|$z==4), # with at most one passenger
      15,grep$_%3,1..14    # possible choices for moves