Result

AC

Duration

544ms

Code [DL]

@z=glob`dd`;$A+=(@z[$_][email protected][$_+3])*($_>[email protected][++$_%3+3]*@z[++$_%3][email protected][$_%3+3]*@z[--$_%3]:0)for 0..8;print$A/6

stdin

47 28 49
83 92 80
46 67 22
05 76 82

stdout

36161

stderr

0+1 records in
0+1 records out