Result

AC

Duration

538ms

Code [DL]

ssss["x:map(int,x.split())"mT"]_@;@_@;-@-@-[":_"]@["_@:_u:[_]u]0&u1&u2&u0&u2&u1&[T"]**@**-":]++6/F

stdin

89 79 39
55 71 97
18 03 31
81 42 41

stdout

21781

stderr

strace