Result

AC

Duration

755ms

Code [DL]

0qN%{S%{i}%}%_1>\1<3*.{.-}e__1=\_3=@*\_4=\_0=@*@-\_8=@*@+\_0=\_5=@*\_2=\_3=@*@-\_7=@*@+\_4=\_2=@*\_1=\_5=@*@-\_6=@*@+6/\;

stdin

28 48 49
10 18 97
13 08 01
58 26 73

stdout

23688

stderr

strace