多级免费停车位查找器


14

与孩子相关的介绍

每当我带孩子去游乐园时,我们离公园越近,孩子们就会变得越紧张,当我们在停车场而找不到停车位时,就会感到神经紧张。因此,我决定我需要一种方法来找到最近的免费停车位,以最大程度地减少停车时间。

技术介绍

想象一下这样的停车场的示意图:

*****************
*               *
* ··CC··C··CC·· *
* ************* *
* ··CCCCCCCCC·· *
*               *
**********E******

在此表示中,是*指墙壁,·免费停车位,E入口和C已经停放的汽车。每个空白处都是要停放的汽车可用于在停车场周围移动的位置。现在让我们将此概念扩展到3D以创建多层停车场:

    1st floor            2nd floor            3rd floor            4th floor
*****************    *****************    *****************    *****************
*               1    *               2    *               3    *               *
* CCCCCCCCCCCCC *    * CCCCCCCCCCCCC *    * ····C··CCCCCC *    * ······C······ *
* ************* *    * ************* *    * ************* *    * ************* *
* CCCCCCCCCCCCC *    * CCCCCCCCCCCCC *    * ···CCCCCCCCCC *    * ··C·······C·· *
*               *    *               1    *               2    *               3
**********E******    *****************    *****************    *****************

这些数字123表示各级之间的连接。在1从与一楼所连接1二楼所以汽车步入1一楼位置出现在1二楼位置。

挑战

给出一个如上所示的停车场方案,根据以下内容编写最短的程序来计算到最近的免费停车位的距离

规则

  • 输入将是3D char数组或2D字符串数组或等效数组,而输出将是单个整数,表示汽车到达最近的免费停车位必须采取的步骤数。如果收到3D char数组,则第一个索引可能代表楼层编号,第二个和第三个索引可能代表每个楼层的(x,y)位置,但这取决于您。
  • 以表示的坡道将不超过9个[1-9]
  • 汽车从该E位置开始(每个地图只有一个进入点),并每次使用空白在四个方向之一上来回移动:上,下,左,右。汽车也可以进入·位置和[1-9]位置。
  • 每次位置(步距)变化均计为1,并且每次轿厢从一个楼层进入另一层时均计为3,因为轿厢必须采取坡道。在这种情况下,从a旁边的空白1到其1自身的运动算作3步,因为这种运动使汽车出现在另一层的1位置。
  • 汽车不能超出矩阵极限。
  • 当要停放的汽车与的位置相同时,计数结束·。如果没有可到达的免费停车位,则可以返回零,负整数,空值或错误。

例子

在上面的示例中,结果为32,因为去四楼并在附近的最近停车位停车比较便宜3。三楼最近的免费停车位在33和34之间。

其他例子:

    1st floor            2nd floor            3rd floor            4th floor
*****************    *****************    *****************    *****************
*               1    *               2    *               3    *               *
* CCCCCCCCCCCCC *    * CCCCCCCCCCCCC *    * ····C··CCCCCC *    * ······C······ *
* ************* *    * ************* *    * ************* *    * ************* *
* CCCCCCCCCCCCC *    * ·CCCCCCCCCCCC *    * ···CCCCCCCCCC *    * ··C·······C·· *
*               *    *               1    *               2    *               3
**********E******    *****************    *****************    *****************

Answer: 28 (now the parking space in the 2nd floor is closer)

    1st floor            2nd floor            3rd floor            4th floor
*****************    *****************    *****************    *****************
*               1    4               2    5               3    6               *
* CCCCCCCCCCCCC *    * CCCCCCCCCCCCC *    * ····C··CCCCCC *    * ······C······ *
* ************* *    * ************* *    * ************* *    * ************* *
* CCCCCCCCCCCCC *    * CCCCCCCCCCCCC *    * ···CCCCCCCCCC *    * ··C·······C·· *
4               *    5               1    6               2    *               3
**********E******    *****************    *****************    *****************

Answer: 24 (now it's better to go to ramp 4 and then to ramp 5 to the third floor)

    1st floor            2nd floor            3rd floor            4th floor
*****************    *****************    *****************    *****************
*               1    *               *    *               3    *               2
* CCCCCCCCCCCCC *    * CCCCCCCCCCCCC *    * ····C··CCCCCC *    * ······C······ *
* ************* *    * ************* *    * ************* *    * ************* *
* CCCCCCCCCCCCC *    * ·CCCCCCCCCCCC *    * ···CCCCCCCCCC *    * ··C·······C·· *
*               *    *               3    *               2    *               1
**********E******    *****************    *****************    *****************

Answer: 16 (now the parking space in the 4th floor is closer)

 1st floor     2nd floor     3rd floor     4th floor     5th floor
************  ************  ************  ************  ************
*CCCCCCCCC 1  *CCCCCCCCC 2  *CCCCCCCCC 3  *·CCCCCCCC 4  *········C *
*          *  *          *  *          *  *          *  *          *
*CCCCCCCCC E  *CCCCCCCCC 1  *CCCCCCCCC 2  *··CCCCCCC 3  *·······CC 4
************  ************  ************  ************  ************

Answer: 29 (both the nearest parking spaces at the 4th and 5th floors are at the same distance)

 1st floor     2nd floor     3rd floor  
************  ************  ************
*CCCCCCCCC 1  *CCCCCCCCC 2  *CCCCCCCCC *
*          *  *          *  *          *
*CCCCCCCCC E  *CCCCCCCCC 1  *CCCCCCCCC 2
************  ************  ************

Answer: -1 (no free parking space)

 1st floor  
************
*          *
*          *
*         E*
************

Answer: -1 (no parking space at all)

 1st floor  
************
* ·····    *
*·      ****
* ····· * E
*********

Answer: -1 (the parking lot designer was a genius)

备择方案

  • 您可以使用任何想要代表停车场地图的字符,只需在答案中指定哪些是您选择的字符及其含义。

这是,所以每种语言中最短的程序/方法/ lambda /无论哪种都可能赢!

如果您需要有关该算法的帮助,请检查我在C#中的(已解禁)实现



由于我们显然是在与疯狂的停车场设计师打交道,因此坡道是否可以直接从例如1楼爬到3楼?我认为您应该添加这样的测试用例(这可能很有趣),或者说明它不会发生。
Arnauld

2
@Arnauld添加了。来自移动应用程序的艰巨任务...
查理

1
-1这次没有五颜六色的方块或孩子的故事
Luis Mendo

1
@mazzy我的意思是,使用Stack Exchange移动应用程序有限的UI,在问题的文本中添加新的测试用例是一项艰巨的任务……
Charlie

Answers:


6

JavaScript(ES6),199个字节

0

a=>(m=g=(c,t,f,x,y,F=f||a.find(r=>r.some((a,i)=>~(y=i,x=a.indexOf(c)))),r=F[y])=>r&&(c=r[x])&&(r[x]=g,c>'z'?m=m<t?m:t:!f|c<1?[0,-1,0,1].map((d,i)=>g(0,-~t,F,x+d,y+~-i%2)):+c&&g(c,t+2),r[x]=c))('E')|m

在线尝试!

怎么样?

递归函数g()作为输入:

  • c:如果我们刚刚离开地板,或者我们正处于流程的开始,那么我们正在寻找的入口点的特征;否则为0
  • t:到目前为止的总移动数(最初是undefined
  • fxy:指向当前楼层和该楼层当前坐标的指针;如果我们正在寻找新地板,它们都不确定

如果˚F定义,我们只是把它复制到当前楼层˚F。否则,我们需要在每个楼层和每一行上进行迭代,直到找到入口c为止,以查找新楼层和新坐标:

F = f || a.find(r => r.some((a, i) => ~(y = i, x = a.indexOf(c))))

我们将r定义为当前楼层的当前行:

r = F[Y]

下一步是确保定义了(x,y)处的当前单元格c

r && (c = r[x]) && ...

如果是,我们将其设置为g,将其标记为已访问,该值不会触发任何即将进行的测试:

r[x] = g

如果c是一个免费停车位,我们将停止递归。如果移动总数低于我们之前的最高分,我们将相应更新m

c > 'z' ? m = m < t ? m : t : ...

如果我们刚刚到达新的楼层(fundefined)或c是一个空格,我们将对每个周围的单元进行递归调用:

!f | c < 1 ?
  [0, -1, 0, 1].map((d, i) =>
    g(0, -~t, F, x + d, y + ~-i % 2)
  )
:
  ...

否则,如果c是坡道标记(即非零数字),我们将处理一个递归调用以到达新楼层:

+c && g(c, t + 2)

最后,我们将当前单元格恢复为其初始值,以便可以在其他递归路径中再次访问它:

r[x] = c

3

科特林,768字节

使用期间。代替 ·。希望我理解Arnauld的答案,因为丢失500个字节会很好。

fun s(l:List<List<CharArray>>)={val b=listOf(l.size-1,l[0].size-1,l[0][0].size-1)
val e=Int.MAX_VALUE
var r=e
var t=listOf(e,e,e)
val d=Array(b[0]+1){Array(b[1]+1){Array(b[2]+1){e}}}
val f={c:Char,n:List<Int>->var a=t
(0..b[0]).map{f->(0..b[1]).map{r->(0..b[2]).map{var s=listOf(f,r,it)
if(l[f][r][it]==c&&!s.equals(n))a=s}}}
a}
fun m(p:List<Int>,c:Int){if(p[0]in 0..b[0]&&p[1]in 0..b[1]&&p[2]in 0..b[2]&&d[p[0]][p[1]][p[2]]>c){d[p[0]][p[1]][p[2]]=c
val h=l[p[0]][p[1]][p[2]]
when(h){' ','E'->(-1..1 step 2).map{m(listOf(p[0],p[1]+it,p[2]),c+1)
m(listOf(p[0],p[1],p[2]+it),c+1)}
'.'->if(r>c)r=c
in '1'..'9'->{val n=f(h,p)
d[n[0]][n[1]][n[2]]=c+2
(-1..1 step 2).map{m(listOf(n[0],n[1]+it,n[2]),c+3)
m(listOf(n[0],n[1],n[2]+it),c+3)}}}}}
m(f('E',t),0)
if(r<e)r
else-1}()

在线尝试!


2

PowerShell中,299个 292字节

假定地图是矩形

x改为使用·。要获取·,您需要将脚本另存为ASCII(不是UTF-8)并替换x·

filter f{$l=($_-split"
")[0].length
$p,$d,$e='x','\d',' '|%{"$_(?=E)|(?<=E)$_|$_(?=[\s\S]{$l}E)|(?<=E[\s\S]{$l})$_"}
for($r=1;$_-notmatch$p;$r++){$m=$_-replace'F','E'-replace'G','F'-replace'H','G'
if($m-match$d){$m=$m-replace$Matches[0],'H'}$m=$m-replace$e,'E'
if($m-eq$_){return -1}$_=$m}$r}

取消测试的脚本:

filter f{
    #Write-Host "`nStep:`n$_" # uncomment this to display each step

    $l = ($_ -split "`n")[0].length
    $p,$d,$e = 'x', '\d', ' '| % {"$_(?=E)|(?<=E)$_|$_(?=[\s\S]{$l}E)|(?<=E[\s\S]{$l})$_"}

    for($r = 1;$_ -notmatch $p;$r++) {
        $m = $_ -replace 'F', 'E' -replace 'G', 'F' -replace 'H', 'G'
        if ($m -match $d) {
            $m = $m -replace $Matches[0], 'H'
        }
        $m = $m -replace $e, 'E'

        if ($m -eq $_) {
            return -1
        }

        $_=$m
    }
    $r
}

@(
    , (2, @"
****
*x E
****
"@)
    , (1, @"
****
* xE
****
"@)
    , (1, @"
****
* x*
* E*
****
"@)
    , (1, @"
****
* E*
* x*
****
"@)
    , (-1, @"
****
2 E1
*  *
****
"@)
    , (28, @"
*****************
*               1
* CCCCCCCCCCCCC *
* ************* *
* CCCCCCCCCCCCC *
*               *
**********E******
*****************
*               2
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               1
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               *
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               3
*****************
"@)
    , (16, @"
*****************
*               1
* CCCCCCCCCCCCC *
* ************* *
* CCCCCCCCCCCCC *
*               *
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               1
*****************
"@)
    , (29, @"
************
*CCCCCCCCC 1
*          *
*CCCCCCCCC E
************
************
*CCCCCCCCC 2
*          *
*CCCCCCCCC 1
************
************
*CCCCCCCCC 3
*          *
*CCCCCCCCC 2
************
************
*xCCCCCCCC 4
*          *
*xxCCCCCCC 3
************
************
*xxxxxxxxC *
*          *
*xxxxxxxCC 4
************
"@
    )
    , (-1, @"
************
*          *
*          *
*         E*
************
"@)
    , (-1, @"
************
* xxxxx    *
*x      ****
* xxxxx * E 
*********   
"@)
) | % {
    $e, $m = $_
    $r = $m|f
    "$($e-eq$r): $r $e"
}

输出:

True: 2 2
True: 1 1
True: 1 1
True: 1 1
True: -1 -1
True: 28 28
True: 16 16
True: 29 29
True: -1 -1
True: -1 -1

16个步骤的扩展输出,可用于停车:

Step:
*****************
*               1
* CCCCCCCCCCCCC *
* ************* *
* CCCCCCCCCCCCC *
*               *
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               1
*****************

Step:
*****************
*               1
* CCCCCCCCCCCCC *
* ************* *
* CCCCCCCCCCCCC *
*         E     *
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               1
*****************

Step:
*****************
*               1
* CCCCCCCCCCCCC *
* ************* *
* CCCCCCCCCCCCC *
*        EEE    *
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               1
*****************

Step:
*****************
*               1
* CCCCCCCCCCCCC *
* ************* *
* CCCCCCCCCCCCC *
*       EEEEE   *
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               1
*****************

Step:
*****************
*               1
* CCCCCCCCCCCCC *
* ************* *
* CCCCCCCCCCCCC *
*      EEEEEEE  *
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               1
*****************

Step:
*****************
*               1
* CCCCCCCCCCCCC *
* ************* *
* CCCCCCCCCCCCC *
*     EEEEEEEEE *
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               1
*****************

Step:
*****************
*               1
* CCCCCCCCCCCCC *
* ************* *
* CCCCCCCCCCCCC *
*    EEEEEEEEEEE*
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               1
*****************

Step:
*****************
*               1
* CCCCCCCCCCCCC *
* ************* *
* CCCCCCCCCCCCCE*
*   EEEEEEEEEEEE*
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               1
*****************

Step:
*****************
*               1
* CCCCCCCCCCCCC *
* *************E*
* CCCCCCCCCCCCCE*
*  EEEEEEEEEEEEE*
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               1
*****************

Step:
*****************
*               1
* CCCCCCCCCCCCCE*
* *************E*
* CCCCCCCCCCCCCE*
* EEEEEEEEEEEEEE*
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               1
*****************

Step:
*****************
*              E1
* CCCCCCCCCCCCCE*
* *************E*
* CCCCCCCCCCCCCE*
*EEEEEEEEEEEEEEE*
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               1
*****************

Step:
*****************
*             EEH
* CCCCCCCCCCCCCE*
* *************E*
*ECCCCCCCCCCCCCE*
*EEEEEEEEEEEEEEE*
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               H
*****************

Step:
*****************
*            EEEG
* CCCCCCCCCCCCCE*
*E*************E*
*ECCCCCCCCCCCCCE*
*EEEEEEEEEEEEEEE*
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               G
*****************

Step:
*****************
*           EEEEF
*ECCCCCCCCCCCCCE*
*E*************E*
*ECCCCCCCCCCCCCE*
*EEEEEEEEEEEEEEE*
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*               F
*****************

Step:
*****************
*E         EEEEEE
*ECCCCCCCCCCCCCE*
*E*************E*
*ECCCCCCCCCCCCCE*
*EEEEEEEEEEEEEEE*
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxx *
*              EE
*****************

Step:
*****************
*EE       EEEEEEE
*ECCCCCCCCCCCCCE*
*E*************E*
*ECCCCCCCCCCCCCE*
*EEEEEEEEEEEEEEE*
**********E******
*****************
*               *
* CCCCCCCCCCCCC *
* ************* *
* xCCCCCCCCCCCC *
*               3
*****************
*****************
*               3
* xxxxCxxCCCCCC *
* ************* *
* xxxCCCCCCCCCC *
*               2
*****************
*****************
*               2
* xxxxxxCxxxxxx *
* ************* *
* xxCxxxxxxxCxxE*
*             EEE
*****************
True: 16 16

说明

这是一种Lee寻路算法。只有一件聪明的事:斜坡上的3步被实现为虚拟状态H->G->F->E


一位天才停车场设计师的Powershell,377 369字节

停车设计是一种2D string array。没有关于地图的假设:任何长度的字符串,没有墙壁的地板,没有入口的停车位,多层和多重出口的坡道。类的成本是+ 26%。

filter f{for($r=1;$_-notmatch$p;$r++){$m=$_-replace'F','E'-replace'G','F'-replace'H','G'
if($m-match$d){$m=$m-replace$Matches[0],'H'}$m=$m-replace$e,'E'
if($m-eq$_){return-1}$_=$m}$r}$g={$l=($args|%{$_|%{$_.length}}|sort)[-1]
$p,$d,$e='x','\d',' '|%{"$_(?=E)|(?<=E)$_|$_(?=[\s\S]{$l}E)|(?<=E[\s\S]{$l})$_"}
(($args|%{$_.PadRight($l,'*')-join"
"})-join"
"+'-'*$l+"
")|f}

取消测试的脚本:

filter f{
    #Write-Host "`nStep:`n$_" # uncomment this to display each step

    for($r = 1;$_ -notmatch $p;$r++) {
        $m = $_ -replace 'F', 'E' -replace 'G', 'F' -replace 'H', 'G'
        if ($m -match $d) {
            $m = $m -replace $Matches[0], 'H'
        }
        $m = $m -replace $e, 'E'

        if ($m -eq $_) {
            return -1
        }

        $_=$m
    }
    $r
}

$g = {

    $l = ($args| % {$_| % {$_.length}}|sort)[-1]
    $p,$d,$e = 'x', '\d', ' '| % {"$_(?=E)|(?<=E)$_|$_(?=[\s\S]{$l}E)|(?<=E[\s\S]{$l})$_"}
    (($args| % {$_.PadRight($l, '*') -join "`n"}) -join "`n"+'-' * $l+"`n")|f

}


@(
    , (2, @(, (
                "****",
                "*x E",
                "****"
            )))
    , (1, @(, (
                "****",
                "* xE",
                "****"
            )))
    , (1, @(, (
                "****",
                "* x*",
                "* E*",
                "****"
            )))
    , (1, @(, (
                "****",
                "* E*",
                "* x*",
                "****"
            )))
    , (-1, @(, (
                "****",
                "2 E1",
                "*  *",
                "****"
            )))
    , (28, @(, (
                "*****************",
                "*               1",
                "* CCCCCCCCCCCCC *",
                "* ************* *",
                "* CCCCCCCCCCCCC *",
                "*               *",
                "**********E******"
            ), (
                "*****************",
                "*               2",
                "* CCCCCCCCCCCCC *",
                "* ************* *",
                "* xCCCCCCCCCCCC *",
                "*               1",
                "*****************"
            ), @(
                "*****************",
                "*               3",
                "* xxxxCxxCCCCCC *",
                "* ************* *",
                "* xxxCCCCCCCCCC *",
                "*               2",
                "*****************"
            ), @(
                "*****************",
                "*               *",
                "* xxxxxxCxxxxxx *",
                "* ************* *",
                "* xxCxxxxxxxCxx *",
                "*               3",
                "*****************"
            )))
    , (16, @(, (
                "*****************",
                "*               1",
                "* CCCCCCCCCCCCC *",
                "* ************* *",
                "* CCCCCCCCCCCCC *",
                "*               *",
                "**********E******"
            ), @(
                "*****************",
                "*               *",
                "* CCCCCCCCCCCCC *",
                "* ************* *",
                "* xCCCCCCCCCCCC *",
                "*               3",
                "*****************"
            ), @(
                "*****************",
                "*               3",
                "* xxxxCxxCCCCCC *",
                "* ************* *",
                "* xxxCCCCCCCCCC *",
                "*               2",
                "*****************"
            ), @(
                "*****************",
                "*               2",
                "* xxxxxxCxxxxxx *",
                "* ************* *",
                "* xxCxxxxxxxCxx *",
                "*               1",
                "*****************"
            )))
    , (29, @(, (
                "************",
                "*CCCCCCCCC 1",
                "*          *",
                "*CCCCCCCCC E",
                "************"
            ), @(
                "************",
                "*CCCCCCCCC 2",
                "*          *",
                "*CCCCCCCCC 1",
                "************"
            ), @(
                "************",
                "*CCCCCCCCC 3",
                "*          *",
                "*CCCCCCCCC 2",
                "************"
            ), @(
                "************",
                "*xCCCCCCCC 4",
                "*          *",
                "*xxCCCCCCC 3",
                "************"
            ), @(
                "************",
                "*xxxxxxxxC *",
                "*          *",
                "*xxxxxxxCC 4",
                "************"
            )))
    , (-1, @(, (
                "************",
                "*          *",
                "*          *",
                "*         E*",
                "************"
            )))
    , (-1, @(, (
                "************",
                "* xxxxx    *",
                "*x      ****",
                "* xxxxx * E",
                "*********"
            )))
) | % {
    $e, $m = $_
    $r = &$g @m
    "$($e-eq$r): $r $e"
}
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.