Result

AC

Duration

559ms

Code [DL]

/o\5&ww]!k]2&wa&[???2&w]]]?-!k?[?*[[?5v
@i/:6k+*?[~w*?[&4kb-*?]]?]*?[&4?w-*?]&<

stdin

84 08 67
04 84 03
28 51 67
36 95 84

stdout

32264

stderr