Result

AC

Duration

1838ms

Code [DL]

void main(){import std.range,std.stdio;stdin.byLine.tee!(l=>write(l[l[1]==l[2]?2:4])).walkLength;}

stdin

422 578
846 622
848 748
184 376
366 611
124 422
411 413
187 879
622 135
121 319
911 314
584 482
529 228
466 616
584 689
336 951
164 688
612 112
959 227
638 279
981 114
522 994
697 918
875 254
974 331
136 654
262 624
722 661
389 993
455 552
681 484
477 772

stdout

26736418231426696122129236629547

stderr

strace

11    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffd3d93c490 /* 6 vars */) = 0
12    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x558ddd01ec00 /* 6 vars */) = 0
12    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
13    execve("/bin/ln", ["ln", "-sf", "/volume/CODE", "/tmp/code.d"], 0x558ddd01ec20 /* 6 vars */) = 0
13    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
14    execve("/usr/bin/gdc", ["gdc", "/tmp/code.d", "-o", "/tmp/code"], 0x558ddd01ec18 /* 6 vars */) = 0
15    execve("/usr/lib/gcc/x86_64-linux-gnu/8/cc1d", ["/usr/lib/gcc/x86_64-linux-gnu/8/"..., "/tmp/code.d", "-quiet", "-dumpbase", "code.d", "-mtune=generic", "-march=x86-64", "-auxbase", "code", "-imultiarch", "x86_64-linux-gnu", "-o", "/tmp/cc7A6VS9.s"], 0x24365e0 /* 11 vars */) = 0
15    +++ exited with 0 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15, si_uid=0, si_status=0, si_utime=25, si_stime=6} ---
16    execve("/bin/as", ["as", "--64", "-o", "/tmp/cc7PoVSX.o", "/tmp/cc7A6VS9.s"], 0x24365e0 /* 11 vars */) = -1 ENOENT (No such file or directory)
16    execve("/usr/local/sbin/as", ["as", "--64", "-o", "/tmp/cc7PoVSX.o", "/tmp/cc7A6VS9.s"], 0x24365e0 /* 11 vars */) = -1 ENOENT (No such file or directory)
16    execve("/usr/local/bin/as", ["as", "--64", "-o", "/tmp/cc7PoVSX.o", "/tmp/cc7A6VS9.s"], 0x24365e0 /* 11 vars */) = -1 ENOENT (No such file or directory)
16    execve("/usr/sbin/as", ["as", "--64", "-o", "/tmp/cc7PoVSX.o", "/tmp/cc7A6VS9.s"], 0x24365e0 /* 11 vars */) = -1 ENOENT (No such file or directory)
16    execve("/usr/bin/as", ["as", "--64", "-o", "/tmp/cc7PoVSX.o", "/tmp/cc7A6VS9.s"], 0x24365e0 /* 11 vars */) = 0
16    +++ exited with 0 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=16, si_uid=0, si_status=0, si_utime=2, si_stime=0} ---
17    execve("/usr/lib/gcc/x86_64-linux-gnu/8/collect2", ["/usr/lib/gcc/x86_64-linux-gnu/8/"..., "-plugin", "/usr/lib/gcc/x86_64-linux-gnu/8/"..., "-plugin-opt=/usr/lib/gcc/x86_64-"..., "-plugin-opt=-fresolution=/tmp/cc"..., "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lm", "-plugin-opt=-pass-through=-lpthr"..., "-plugin-opt=-pass-through=-ldl", "-plugin-opt=-pass-through=-lc", "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lgcc", "--build-id", "--eh-frame-hdr", "-m", "elf_x86_64", "--hash-style=gnu", "--as-needed", "-dynamic-linker", "/lib64/ld-linux-x86-64.so.2", "-pie", "-z", "now", "-z", "relro", "-o", "/tmp/code", "/usr/lib/gcc/x86_64-linux-gnu/8/"..., "/usr/lib/gcc/x86_64-linux-gnu/8/"..., "/usr/lib/gcc/x86_64-linux-gnu/8/"..., "-L/usr/lib/gcc/x86_64-linux-gnu/"..., ...], 0x2436c60 /* 13 vars */) = 0
18    execve("/usr/bin/ld", ["/usr/bin/ld", "-plugin", "/usr/lib/gcc/x86_64-linux-gnu/8/"..., "-plugin-opt=/usr/lib/gcc/x86_64-"..., "-plugin-opt=-fresolution=/tmp/cc"..., "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lm", "-plugin-opt=-pass-through=-lpthr"..., "-plugin-opt=-pass-through=-ldl", "-plugin-opt=-pass-through=-lc", "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lgcc", "--build-id", "--eh-frame-hdr", "-m", "elf_x86_64", "--hash-style=gnu", "--as-needed", "-dynamic-linker", "/lib64/ld-linux-x86-64.so.2", "-pie", "-z", "now", "-z", "relro", "-o", "/tmp/code", "/usr/lib/gcc/x86_64-linux-gnu/8/"..., "/usr/lib/gcc/x86_64-linux-gnu/8/"..., "/usr/lib/gcc/x86_64-linux-gnu/8/"..., "-L/usr/lib/gcc/x86_64-linux-gnu/"..., ...], 0x7ffc510b7090 /* 13 vars */) = 0
18    +++ exited with 0 +++
17    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=18, si_uid=0, si_status=0, si_utime=8, si_stime=2} ---
17    +++ exited with 0 +++
14    --- 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 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
20    execve("/tmp/code", ["/tmp/code"], 0x558ddd01ebd0 /* 6 vars */) = 0
19    execve("/bin/cat", ["cat", "-"], 0x558ddd01ebe8 /* 6 vars */) = 0
19    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=19, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
20    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=20, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
21    execve("/bin/rm", ["rm", "/tmp/code.d", "/tmp/code"], 0x558ddd01ebd0 /* 6 vars */) = 0
21    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
11    +++ exited with 0 +++