Result

WA

Duration

799ms

Code [DL]

$input|%{$_[$_[4]-$_[5]?2:4]}

stdin

658 588
149 445
896 981
344 298
558 886
399 837
259 332
649 849
858 565
511 516
133 556
588 898
966 643
142 245
723 328
742 227
289 917
977 995
693 553
381 449
428 893
386 929
958 684
711 515
662 127
117 617
153 199
997 991
277 779
244 446
487 874
249 235

stdout

stderr

/volume/CODE:1: syntax error
I give up.
/root/script: line 5: /tmp/code: not found
rm: can't remove '/tmp/code': No such file or directory

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fffa995e4e0 /* 9 vars */) = 0
11    execve("/usr/local/bin/iverilog", ["/usr/local/bin/iverilog", "-o", "/tmp/code", "/volume/CODE"], 0x56203ed84d50 /* 9 vars */) = 0
12    execve("/bin/sh", ["sh", "-c", "/usr/local/lib/ivl/ivlpp  -L -F\""...], 0x7ffc222a8880 /* 9 vars */) = 0
14    execve("/usr/local/lib/ivl/ivl", ["/usr/local/lib/ivl/ivl", "-C/tmp/ivrlh3999c4e2", "-C/usr/local/lib/ivl/vvp.conf", "--", "-"], 0x55e9f4271290 /* 9 vars */) = 0
13    execve("/usr/local/lib/ivl/ivlpp", ["/usr/local/lib/ivl/ivlpp", "-L", "-F/tmp/ivrlg23999c4e2", "-f/tmp/ivrlg3999c4e2", "-p/tmp/ivrli3999c4e2"], 0x55e9f42712a8 /* 9 vars */) = 0
13    +++ exited with 0 +++
12    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
14    +++ exited with 2 +++
12    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14, si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
12    +++ exited with 2 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
11    +++ exited with 2 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11, si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
15    execve("/bin/cat", ["cat", "-"], 0x56203ed84d08 /* 9 vars */ <unfinished ...>
16    execve("/tmp/code", ["/tmp/code"], 0x56203ed84cf0 /* 9 vars */) = -1 ENOENT (No such file or directory)
16    +++ exited with 127 +++
15    <... execve resumed>)             = 0
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=16, si_uid=0, si_status=127, si_utime=0, si_stime=0} ---
15    --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=15, si_uid=0} ---
15    +++ killed by SIGPIPE +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=15, si_uid=0, si_status=SIGPIPE, si_utime=0, si_stime=0} ---
17    execve("/bin/rm", ["rm", "/tmp/code"], 0x56203ed84c98 /* 9 vars */) = 0
17    +++ exited with 1 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=17, si_uid=0, si_status=1, si_utime=0, si_stime=0} ---
10    +++ exited with 1 +++