Result

AC

Duration

715ms

Code [DL]

get s p=substr(s,"T")while p{get t?s q=substr(t,"K")if q{?copy(" ",q-1)+copy("1",p-q+1)p=0}}

stdin

                     T                            
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
            K                                     

stdout

                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
                     T                            
            1111111111

stderr

strace

11    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fff015895f0 /* 9 vars */) = 0
12    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x55ad34ea3d18 /* 9 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.ring"], 0x55ad34ea3d38 /* 9 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} ---
15    execve("/root/ring", ["/root/ring", "/tmp/code.ring"], 0x55ad34ea3d40 /* 9 vars */) = 0
14    execve("/bin/cat", ["cat", "-"], 0x55ad34ea3d30 /* 9 vars */) = 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} ---
15    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15, si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
16    execve("/bin/rm", ["rm", "/tmp/code.ring"], 0x55ad34ea3c98 /* 9 vars */) = 0
16    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=16, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
11    +++ exited with 0 +++