Result

AC

Duration

564ms

Code [DL]

a = 4.times.map{gt.split.map{|s|s.toi}}
v = 9.times.map{|i| a[i/3+1][i%3]-a[0][i%3]}
p (v[0]*(v[4]*v[8]-v[5]*v[7])+v[1]*(v[5]*v[6]-v[3]*v[8])+v[2]*(v[3]*v[7]-v[4]*v[6]))/6

stdin

89 03 56
49 14 07
31 49 08
70 50 31

stdout

6765

stderr