Result

AC

Duration

822ms

Code [DL]

main=interact$h.map f.lines;f x=show$g 0 0 x;g _ n[]=n;g 0n(x:xs)|x=='|'=g 0(n+1)xs|0<1=g 1 n xs;g 1n(x:xs)|x=='|'=g 0(n+1)xs|0<1=n;h x=x>>=(++" ")

stdin

|____|____
||__|___||
|_||||_|__
|___||||||
||_||_|___
|_|||__|_|
|||||||||_
||_|_||___
|__||__||_
|_|_|_____
|||_|__|__
|__||_||||
|__|__||__
|_||||||__
|_|||||_|_
|__|____|_
|||_|||___
||||_____|
||__|__||_
|__|_||___
|||||||_||
|||____|||
|_|||_|___
||||___||_
|__|||____
||____|||_
|___|_||||
||||__||||
||_|____||
||_______|

stdout

1 2 6 1 5 4 9 5 1 3 4 1 1 7 7 1 6 4 2 1 9 3 5 4 1 2 1 4 3 2 

stderr

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fffb46fe580 /* 7 vars */) = 0
12    execve("/usr/bin/runghc", ["/usr/bin/runghc", "/volume/CODE"], 0x55ec21930d40 /* 7 vars */) = 0
12    execve("/usr/lib/ghc-8.8.3/bin/runghc", ["/usr/lib/ghc-8.8.3/bin/runghc", "-f", "/usr/bin/ghc-8.8.3", "/volume/CODE"], 0x562595a0b168 /* 7 vars */ <unfinished ...>
11    execve("/bin/cat", ["cat", "-"], 0x55ec21930d30 /* 7 vars */ <unfinished ...>
12    <... execve resumed>)             = 0
11    <... execve resumed>)             = 0
11    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
12    execve("/usr/bin/ghc-8.8.3", ["/usr/bin/ghc-8.8.3", "-ignore-dot-ghci", "-x", "hs", "-e", ":set prog \"/volume/CODE\"", "-e", ":main []", "/volume/CODE"], 0x7ffd6d2858d0 /* 7 vars */) = 0
12    execve("/usr/lib/ghc-8.8.3/bin/ghc", ["/usr/lib/ghc-8.8.3/bin/ghc", "-B/usr/lib/ghc-8.8.3", "-ignore-dot-ghci", "-x", "hs", "-e", ":set prog \"/volume/CODE\"", "-e", ":main []", "/volume/CODE"], 0x5625a4fbb200 /* 7 vars */) = 0
17    execve("/bin/gcc", ["gcc", "-DTABLES_NEXT_TO_CODE", "-B/usr/lib/ghc-8.8.3/integer-gmp"..., "--print-file-name", "libgmp.so"], 0x7fff23de0580 /* 7 vars */) = -1 ENOENT (No such file or directory)
17    execve("/usr/local/sbin/gcc", ["gcc", "-DTABLES_NEXT_TO_CODE", "-B/usr/lib/ghc-8.8.3/integer-gmp"..., "--print-file-name", "libgmp.so"], 0x7fff23de0580 /* 7 vars */) = -1 ENOENT (No such file or directory)
17    execve("/usr/local/bin/gcc", ["gcc", "-DTABLES_NEXT_TO_CODE", "-B/usr/lib/ghc-8.8.3/integer-gmp"..., "--print-file-name", "libgmp.so"], 0x7fff23de0580 /* 7 vars */) = -1 ENOENT (No such file or directory)
17    execve("/usr/sbin/gcc", ["gcc", "-DTABLES_NEXT_TO_CODE", "-B/usr/lib/ghc-8.8.3/integer-gmp"..., "--print-file-name", "libgmp.so"], 0x7fff23de0580 /* 7 vars */) = -1 ENOENT (No such file or directory)
17    execve("/usr/bin/gcc", ["gcc", "-DTABLES_NEXT_TO_CODE", "-B/usr/lib/ghc-8.8.3/integer-gmp"..., "--print-file-name", "libgmp.so"], 0x7fff23de0580 /* 7 vars */) = 0
17    +++ exited with 0 +++
12    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=17, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
14    +++ exited with 0 +++
15    +++ exited with 0 +++
16    +++ exited with 0 +++
18    +++ exited with 0 +++
13    +++ exited with 0 +++
12    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=0, si_utime=21, si_stime=5} ---
10    +++ exited with 0 +++