Result

AC

Duration

1014ms

Code [DL]

a:
	$(foreach s,$(subst $% ,X,$(STDIN)),$(word 1,$(foreach i,1 2 3 4 5 6 7 8 9,$(if $(findstring $i$i$i,$(subst X,$i,$s)),$i)) 1))

stdin

857 748
559 332
289 895
122 282
455 893
393 354
642 229
844 143
625 526
159 565
566 667
136 367
811 339
429 483
627 212
377 176
898 186
755 228
732 334
764 463
216 713
941 112
816 414
679 176
183 582
877 779
371 211
937 512
725 661
655 518
824 227
988 169

stdout

7 3 1 2 5 3 2 4 5 1 6 1 1 1 1 7 1 2 3 4 1 1 1 1 1 7 1 1 6 5 2 8

stderr

make: 7: No such file or directory
make: *** [/volume/CODE:2: a] Error 127

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffdf890e7b0 /* 7 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x5622b112a028 /* 7 vars */ <unfinished ...>
12    execve("/usr/bin/ag_launcher", ["/usr/bin/ag_launcher", "-i", "/usr/bin/make", "-f", "/volume/CODE"], 0x5622b112a0a8 /* 7 vars */ <unfinished ...>
11    <... execve resumed>)             = 0
12    <... execve resumed>)             = 0
12    execve("/usr/bin/make", ["/usr/bin/make", "-f", "/volume/CODE"], 0x5583674b6da0 /* 8 vars */ <unfinished ...>
11    +++ exited with 0 +++
12    <... execve resumed>)             = 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    +++ exited with 2 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
10    +++ exited with 2 +++