Result

WA

Duration

744ms

Code [DL]

x=$(subst $() ,1,$(STDIN))
a=$(subst 1, ,$(firstword $x))
b=$(subst 1, 1 ,$(lastword $x))
c=$(subst $() , 1 ,$a)
p=1
s=x
$(foreach i,$x,$(if $(findstring $(subst 1,,$i),K),,$(info $a)),),$(foreach i,$b,$(if $(findstring $i,K),$(eval p=2)) $(eval s+=$p) $(if $(findstring $(word $(words $s),$c),T),$(eval p=1))),$(info $(subst 1, ,$(subst x,,$(subst $() ,,$s))))

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                             
          2222222222                              

stderr

/volume/CODE:7: *** missing separator.  Stop.

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffe8e66c490 /* 7 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x561c5268a068 /* 7 vars */) = 0
11    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
12    execve("/usr/bin/ag_launcher", ["/usr/bin/ag_launcher", "-i", "/usr/bin/make", "-f", "/volume/CODE"], 0x561c5268a0e8 /* 7 vars */) = 0
12    execve("/usr/bin/make", ["/usr/bin/make", "-f", "/volume/CODE"], 0x557d0712ec80 /* 8 vars */) = 0
12    +++ exited with 2 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=2, si_utime=1, si_stime=0} ---
10    +++ exited with 2 +++