fork download
  1. #!perl -p0
  2. /
  3. /;$x="(|.{@-})";y/0/./while s/$.$x\K$"|$"(?=$x$.)/-/s||($"=$.++)<9
Success #stdin #stdout 0s 6044KB
stdin
34565432100100000000
45676543210000000000
56787654321000000110
45676543210000001221
34565432100000012321
23454321000000123432
12343210000001234543
01232100000012345654
00121000000011234543
00010000000121123432
stdout
---------..1........
----------..........
---8-------......--.
----------......--2-
---------......-----
--------......------
-------......-------
.-----......-----6--
..---.......--------
...-.......-2-------