Result

AC

Duration

1139ms

Code [DL]

main=interact$map f.lines;f(_:a:b:x)|a==b=a|0<1=x!!1

stdin

644 639
221 113
697 794
644 283
553 634
611 126
338 384
766 366
247 575
833 885
128 287
125 569
266 643
347 415
372 731
374 775
675 493
591 696
155 557
235 992
577 771
126 432
615 514
443 965
283 886
842 881
421 114
539 764
744 336
927 742
299 898
351 658

stdout

41746136532564774659745988174796

stderr

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fff67355c30 /* 7 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x55ea09644d30 /* 7 vars */ <unfinished ...>
12    execve("/usr/bin/runghc", ["/usr/bin/runghc", "/volume/CODE"], 0x55ea09644d40 /* 7 vars */ <unfinished ...>
11    <... execve resumed>)             = 0
12    <... 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/lib/ghc-8.8.3/bin/runghc", ["/usr/lib/ghc-8.8.3/bin/runghc", "-f", "/usr/bin/ghc-8.8.3", "/volume/CODE"], 0x55fbb2ab0168 /* 7 vars */) = 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"], 0x7ffd9a9c6260 /* 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"], 0x5625fa97c200 /* 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"], 0x7ffcd488b130 /* 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"], 0x7ffcd488b130 /* 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"], 0x7ffcd488b130 /* 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"], 0x7ffcd488b130 /* 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"], 0x7ffcd488b130 /* 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 +++
18    +++ exited with 0 +++
16    +++ 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=18, si_stime=5} ---
10    +++ exited with 0 +++