Result

AC

Duration

1065ms

Code [DL]

void main(){import std.stdio;string s;while((s=readln)!is null)write=s[s[1]-s[2]?4:2];}

stdin

337 758
154 445
765 561
944 843
452 282
433 855
368 987
447 348
654 449
499 925
826 186
995 194
311 828
534 336
886 559
664 662
382 814
926 113
656 169
299 661
351 519
581 855
821 283
911 612
422 213
296 967
986 438
244 362
723 325
377 778
544 443
799 448

stdout

74542393491113568119582129443749

stderr

strace

14    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fff6e8a8880 /* 6 vars */) = 0
15    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x559ce0bbcc00 /* 6 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=0, si_stime=0} ---
16    execve("/bin/ln", ["ln", "-sf", "/volume/CODE", "/tmp/code.d"], 0x559ce0bbcc20 /* 6 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=0, si_stime=0} ---
17    execve("/usr/bin/gdc", ["gdc", "/tmp/code.d", "-o", "/tmp/code"], 0x559ce0bbcc18 /* 6 vars */) = 0
18    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/ccgnV9kc.s"], 0xf085e0 /* 11 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=6, si_stime=1} ---
19    execve("/bin/as", ["as", "--64", "-o", "/tmp/cczNlvdR.o", "/tmp/ccgnV9kc.s"], 0xf085e0 /* 11 vars */) = -1 ENOENT (No such file or directory)
19    execve("/usr/local/sbin/as", ["as", "--64", "-o", "/tmp/cczNlvdR.o", "/tmp/ccgnV9kc.s"], 0xf085e0 /* 11 vars */) = -1 ENOENT (No such file or directory)
19    execve("/usr/local/bin/as", ["as", "--64", "-o", "/tmp/cczNlvdR.o", "/tmp/ccgnV9kc.s"], 0xf085e0 /* 11 vars */) = -1 ENOENT (No such file or directory)
19    execve("/usr/sbin/as", ["as", "--64", "-o", "/tmp/cczNlvdR.o", "/tmp/ccgnV9kc.s"], 0xf085e0 /* 11 vars */) = -1 ENOENT (No such file or directory)
19    execve("/usr/bin/as", ["as", "--64", "-o", "/tmp/cczNlvdR.o", "/tmp/ccgnV9kc.s"], 0xf085e0 /* 11 vars */) = 0
19    +++ exited with 0 +++
17    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=19, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
20    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/"..., ...], 0xf08c60 /* 13 vars */) = 0
21    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/"..., ...], 0x7ffd81133100 /* 13 vars */) = 0
21    +++ exited with 0 +++
20    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21, si_uid=0, si_status=0, si_utime=4, si_stime=3} ---
20    +++ exited with 0 +++
17    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=20, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
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} ---
22    execve("/bin/cat", ["cat", "-"], 0x559ce0bbcbe8 /* 6 vars */ <unfinished ...>
23    execve("/tmp/code", ["/tmp/code"], 0x559ce0bbcbd0 /* 6 vars */ <unfinished ...>
22    <... execve resumed> )            = 0
23    <... execve resumed> )            = 0
22    +++ exited with 0 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=22, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
23    +++ exited with 0 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=23, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
24    execve("/bin/rm", ["rm", "/tmp/code.d", "/tmp/code"], 0x559ce0bbcbd0 /* 6 vars */) = 0
24    +++ exited with 0 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=24, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
14    +++ exited with 0 +++