fork download
  1. for inputTS in input():
  2. print ''.join(str(v) for v in inputTS)
  3.  
  4. for b in[-1]+inputTS:exec["p=b>0;d=2;s=1;t=2","d+=b/2*(-2<d+b<6)","s+=b/3*(-3<s+b<5)","t=3-t"][abs(b)-1]
  5. i=c=(s>0)*d*p
  6. q='print" |"[s/2]*t+" "*i+t*%r;'
  7. exec('i-=1;'+q%'/')*c
  8. print"L "+" -="[t]*2*d*p
  9. exec(q%'\\'+'i+=1;')*c
  10.  
  11. print
Success #stdin #stdout 0s 9032KB
stdin
[[1,2,-3,4],[1,4,-3,2,2,4,3,3,3,-2],[1,4,2,-1,-3,1,4,-3,-3,2,2],[1,3,2,4,-2,-3],[1,3,4],[1,-2,-2,-2,1,4,-3,-3,-3]]
stdout
12-34
L ------

14-3224333-2
||  //
|| //
||//
L ======
||\\
|| \\
||  \\

142-1-314-3-322
L --------

1324-2-3
  /
 /
L ----
 \
  \

134
| /
|/
L ----
|\
| \

1-2-2-214-3-3-3
L ----