Result

AC

Duration

490ms

Code [DL]

a=(`cat`)
for z in {0..8};{
$[a[t=z]-=a[9+z%3],s+=z/6*a[z]*(a[p=++t%3+3]*a[q=++t%3]-a[q+3]*a[p-3])/6]
}
echo $s

stdin

04 84 99
90 65 85
03 29 95
44 79 29

stdout

50480

stderr

/volume/CODE: line 3: 0: command not found
/volume/CODE: line 3: 0: command not found
/volume/CODE: line 3: 0: command not found
/volume/CODE: line 3: 0: command not found
/volume/CODE: line 3: 0: command not found
/volume/CODE: line 3: 0: command not found
/volume/CODE: line 3: 8610: command not found
/volume/CODE: line 3: 54110: command not found
/volume/CODE: line 3: 50480: command not found

strace