Result

AC

Duration

575ms

Code [DL]

$<.map(&:bytes).each{|a|p a[0]-a[1]==1||a[1]-a[2]==1?0:1}

stdin

1230
1230
0123
1032
2301
1230
1032
1230
0123
0123
2103
2103
3210
0321
2301
3210
2103
0321
2103
3210
3210
3012
3210
0123
2103
1230
1032
0123
1230
3012
0321
1032

stdout

1
1
1
0
1
1
0
1
1
1
0
0
0
0
1
0
0
0
0
0
0
1
0
1
0
1
0
1
1
1
0
0

stderr

strace

12    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fff958abf68 /* 9 vars */) = 0
14    execve("/usr/local/ruby-latest/bin/ruby", ["/usr/local/ruby-latest/bin/ruby", "/volume/CODE"], 0x7fb344243260 /* 9 vars */ <unfinished ...>
13    execve("/bin/cat", ["cat", "-"], 0x7fb344243240 /* 9 vars */) = 0
14    <... execve resumed>)             = 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 0 +++
12    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14, si_uid=0, si_status=0, si_utime=5, si_stime=0} ---
12    +++ exited with 0 +++