Result

AC

Duration

704ms

Code [DL]

FOR i IN {1..50}:
	READ s RAW
	FOR j IN {1..50}:
		IF s@j|1 = "T":PUT j IN t
		IF s@j|1 = "K":
			WRITE " "^^j-1,"K"^^t-j+1
			QUIT
	WRITE " "^^t-1,"T"/

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
                       T
                       T
                       T
                       T
                       T
                       T
                       T
                       T
                       T
                       T
                       T
                  KKKKKK

stderr

strace

11    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffc284d97e0 /* 8 vars */) = 0
12    execve("/bin/cat", ["cat", "-"], 0x558c285d3bd8 /* 8 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} ---
14    execve("/root/ABC/abc", ["/root/ABC/abc", "/volume/CODE"], 0x558c2881a758 /* 8 vars */ <unfinished ...>
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 resumed> )            = 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} ---
11    +++ exited with 0 +++