Result

AC

Duration

564ms

Code [DL]

000\&6,n;
0(?\ia*i+4[:{-}]i
[0&\d[r9
:?!\{:{:@{@{{:}@:}*}*{-@}}@}*&+&0}}}

stdin

33 90 28
19 01 40
57 82 02
46 73 43

stdout

11057

stderr

strace