Result

AC

Duration

486ms

Code [DL]

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

stdin

37 78 50
19 57 11
27 11 87
05 30 44

stdout

8636

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: 38412: command not found
/volume/CODE: line 3: 60072: command not found
/volume/CODE: line 3: 51816: command not found

strace